Package org.apache.calcite.avatica
Interface AvaticaFactory
public interface AvaticaFactory
Factory for JDBC objects.
There is an implementation for each supported JDBC version.
-
Method Summary
Modifier and TypeMethodDescriptionint
int
newConnection
(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) newDatabaseMetaData
(AvaticaConnection connection) Creates meta data for the database.newPreparedStatement
(AvaticaConnection connection, Meta.StatementHandle h, Meta.Signature signature, int resultSetType, int resultSetConcurrency, int resultSetHoldability) newResultSet
(AvaticaStatement statement, QueryState state, Meta.Signature signature, TimeZone timeZone, Meta.Frame firstFrame) Creates a result set.newResultSetMetaData
(AvaticaStatement statement, Meta.Signature signature) Creates meta data for a result set.newStatement
(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
-
Method Details
-
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 callAvaticaResultSet.execute()
on it.- Parameters:
statement
- Statementstate
- The state used to create this result setsignature
- Prepared statementtimeZone
- Time zonefirstFrame
- 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
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
- Statementsignature
- Prepared statement- Returns:
- Result set meta data
- Throws:
SQLException
-