Package org.apache.calcite.avatica
Class AvaticaJdbc41Factory
- java.lang.Object
-
- org.apache.calcite.avatica.AvaticaJdbc41Factory
-
- All Implemented Interfaces:
AvaticaFactory
class AvaticaJdbc41Factory extends java.lang.Object implements AvaticaFactory
Implementation ofAvaticaFactoryfor JDBC 4.1 (corresponds to JDK 1.7).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAvaticaJdbc41Factory.AvaticaJdbc41ConnectionImplementation of Connection for JDBC 4.1.private static classAvaticaJdbc41Factory.AvaticaJdbc41DatabaseMetaDataImplementation of DatabaseMetaData for JDBC 4.1.private static classAvaticaJdbc41Factory.AvaticaJdbc41PreparedStatementImplementation of PreparedStatement for JDBC 4.1.private static classAvaticaJdbc41Factory.AvaticaJdbc41StatementImplementation of Statement for JDBC 4.1.
-
Constructor Summary
Constructors Modifier Constructor Description AvaticaJdbc41Factory()Creates a JDBC factory.protectedAvaticaJdbc41Factory(int major, int minor)Creates a JDBC factory with given major/minor version number.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetJdbcMajorVersion()intgetJdbcMinorVersion()AvaticaConnectionnewConnection(UnregisteredDriver driver, AvaticaFactory factory, java.lang.String url, java.util.Properties info)AvaticaSpecificDatabaseMetaDatanewDatabaseMetaData(AvaticaConnection connection)Creates meta data for the database.AvaticaPreparedStatementnewPreparedStatement(AvaticaConnection connection, Meta.StatementHandle h, Meta.Signature signature, int resultSetType, int resultSetConcurrency, int resultSetHoldability)AvaticaResultSetnewResultSet(AvaticaStatement statement, QueryState state, Meta.Signature signature, java.util.TimeZone timeZone, Meta.Frame firstFrame)Creates a result set.AvaticaResultSetMetaDatanewResultSetMetaData(AvaticaStatement statement, Meta.Signature signature)Creates meta data for a result set.AvaticaStatementnewStatement(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
-
-
-
Method Detail
-
getJdbcMajorVersion
public int getJdbcMajorVersion()
- Specified by:
getJdbcMajorVersionin interfaceAvaticaFactory
-
getJdbcMinorVersion
public int getJdbcMinorVersion()
- Specified by:
getJdbcMinorVersionin interfaceAvaticaFactory
-
newConnection
public AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, java.lang.String url, java.util.Properties info)
- Specified by:
newConnectionin interfaceAvaticaFactory
-
newDatabaseMetaData
public AvaticaSpecificDatabaseMetaData newDatabaseMetaData(AvaticaConnection connection)
Description copied from interface:AvaticaFactoryCreates meta data for the database.- Specified by:
newDatabaseMetaDatain interfaceAvaticaFactory- Returns:
- Database meta data
-
newStatement
public AvaticaStatement newStatement(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Specified by:
newStatementin interfaceAvaticaFactory
-
newPreparedStatement
public AvaticaPreparedStatement newPreparedStatement(AvaticaConnection connection, Meta.StatementHandle h, Meta.Signature signature, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
- Specified by:
newPreparedStatementin interfaceAvaticaFactory- Throws:
java.sql.SQLException
-
newResultSet
public AvaticaResultSet newResultSet(AvaticaStatement statement, QueryState state, Meta.Signature signature, java.util.TimeZone timeZone, Meta.Frame firstFrame) throws java.sql.SQLException
Description copied from interface:AvaticaFactoryCreates a result set. You will then need to callAvaticaResultSet.execute()on it.- Specified by:
newResultSetin interfaceAvaticaFactory- 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:
java.sql.SQLException
-
newResultSetMetaData
public AvaticaResultSetMetaData newResultSetMetaData(AvaticaStatement statement, Meta.Signature signature)
Description copied from interface:AvaticaFactoryCreates meta data for a result set.- Specified by:
newResultSetMetaDatain interfaceAvaticaFactory- Parameters:
statement- Statementsignature- Prepared statement- Returns:
- Result set meta data
-
-