# Class JdbcConsumer

java.lang.Object
uk.ac.starlink.ttools.mode.JdbcConsumer

All Implemented Interfaces:
  `TableConsumer`

public class JdbcConsumer extends Object implements TableConsumer
Table consumer which disposes of a table by writing it as a new table in a SQL database using JDBC.

Since:
  27 Sep 2005
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`JdbcConsumer(String url, uk.ac.starlink.table.jdbc.JDBCHandler handler, uk.ac.starlink.table.jdbc.WriteMode mode)`
Constructs a new consumer from a location and a JDBC handler.
`JdbcConsumer(String url, uk.ac.starlink.task.Environment env, uk.ac.starlink.table.jdbc.WriteMode mode)`
Constructs a new consumer from a location and an execution environment which will be used for JDBC authentication.

## Method Summary

Modifier and Type
Method
Description
`void`
`consume(uk.ac.starlink.table.StarTable table)`
Consumes a table.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### JdbcConsumer

public JdbcConsumer(String url, uk.ac.starlink.table.jdbc.JDBCHandler handler, uk.ac.starlink.table.jdbc.WriteMode mode)
Constructs a new consumer from a location and a JDBC handler.

Parameters:
  `url` - destination (jdbc:) URL for table
  `handler` - JDBC handler
  `mode` - write mode

### JdbcConsumer

public JdbcConsumer(String url, uk.ac.starlink.task.Environment env, uk.ac.starlink.table.jdbc.WriteMode mode)
Constructs a new consumer from a location and an execution environment which will be used for JDBC authentication.

Parameters:
  `url` - destination (jdbc:) URL for table
  `env` - execution environment
  `mode` - write mode

## Method Details

### consume

public void consume(uk.ac.starlink.table.StarTable table) throws IOException
Description copied from interface: `TableConsumer`
Consumes a table.

Specified by:
  `consume` in interface `TableConsumer`
Parameters:
  `table` - table to consume
Throws:
  `IOException`