org.apache.calcite.avatica

## Interface AvaticaFactory

    public interface AvaticaFactory

Factory for JDBC objects.

There is an implementation for each supported JDBC version.

### Method Summary

All Methods Instance Methods Abstract Methods
`int` `getJdbcMajorVersion()`
`int` `getJdbcMinorVersion()`
`AvaticaConnection` `newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info)`
`AvaticaSpecificDatabaseMetaData` `newDatabaseMetaData(AvaticaConnection connection)` Creates meta data for the database.
`AvaticaPreparedStatement` `newPreparedStatement(AvaticaConnection connection, Meta.StatementHandle h, Meta.Signature signature, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
`AvaticaResultSet` `newResultSet(AvaticaStatement statement, QueryState state, Meta.Signature signature, TimeZone timeZone, Meta.Frame firstFrame)` Creates a result set.
`ResultSetMetaData` `newResultSetMetaData(AvaticaStatement statement, Meta.Signature signature)` Creates meta data for a result set.
`AvaticaStatement` `newStatement(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`

### Method Detail

#### getJdbcMajorVersion

    int getJdbcMajorVersion()

#### getJdbcMinorVersion

    int getJdbcMinorVersion()

#### newConnection

    AvaticaConnection newConnection(UnregisteredDriver driver,
                                    AvaticaFactory factory,
                                    String url,
                                    Properties info)
                             throws SQLException

Throws:
  `SQLException`

#### newStatement

    AvaticaStatement newStatement(AvaticaConnection connection,
                                  Meta.StatementHandle h,
                                  int resultSetType,
                                  int resultSetConcurrency,
                                  int resultSetHoldability)
                           throws SQLException

Throws:
  `SQLException`

#### newPreparedStatement

    AvaticaPreparedStatement newPreparedStatement(AvaticaConnection connection,
                                                  Meta.StatementHandle h,
                                                  Meta.Signature signature,
                                                  int resultSetType,
                                                  int resultSetConcurrency,
                                                  int resultSetHoldability)
                                           throws SQLException

Throws:
  `SQLException`

#### newResultSet

    AvaticaResultSet newResultSet(AvaticaStatement statement,
                                  QueryState state,
                                  Meta.Signature signature,
                                  TimeZone timeZone,
                                  Meta.Frame firstFrame)
                           throws SQLException

Creates a result set. You will then need to call `AvaticaResultSet.execute()` on it.

Parameters:
  `statement` - Statement
  `state` - The state used to create this result set
  `signature` - Prepared statement
  `timeZone` - Time zone
  `firstFrame` - Frame containing the first (or perhaps only) rows in the result, or null if an execute/fetch is required
Returns:
  Result set
Throws:
  `SQLException`

#### newDatabaseMetaData

    AvaticaSpecificDatabaseMetaData newDatabaseMetaData(AvaticaConnection connection)

Creates meta data for the database.

Returns:
  Database meta data

#### newResultSetMetaData

    ResultSetMetaData newResultSetMetaData(AvaticaStatement statement,
                                           Meta.Signature signature)
                                    throws SQLException

Creates meta data for a result set.

Parameters:
  `statement` - Statement
  `signature` - Prepared statement
Returns:
  Result set meta data
Throws:
  `SQLException`