Package org.apache.calcite.avatica

## Interface AvaticaFactory

All Known Implementing Classes:
  `AvaticaJdbc41Factory`

    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, java.lang.String url, java.util.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, java.util.TimeZone timeZone, Meta.Frame firstFrame)` Creates a result set.
`java.sql.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,
                                    java.lang.String url,
                                    java.util.Properties info)
                             throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### newStatement

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

Throws:
  `java.sql.SQLException`

#### newPreparedStatement

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

Throws:
  `java.sql.SQLException`

#### newResultSet

    AvaticaResultSet newResultSet​(AvaticaStatement statement,
                                  QueryState state,
                                  Meta.Signature signature,
                                  java.util.TimeZone timeZone,
                                  Meta.Frame firstFrame)
                           throws java.sql.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:
  `java.sql.SQLException`

#### newDatabaseMetaData

    AvaticaSpecificDatabaseMetaData newDatabaseMetaData​(AvaticaConnection connection)

Creates meta data for the database.

Returns:
  Database meta data

#### newResultSetMetaData

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

Creates meta data for a result set.

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