MetaImpl.ColumnNoNulls, MetaImpl.ColumnNullable, MetaImpl.ColumnNullableUnknown, MetaImpl.MetaAttribute, MetaImpl.MetaBestRowIdentifier, MetaImpl.MetaCatalog, MetaImpl.MetaClientInfoProperty, MetaImpl.MetaColumn, MetaImpl.MetaColumnPrivilege, MetaImpl.MetaCrossReference, MetaImpl.MetaExportedKey, MetaImpl.MetaFunction, MetaImpl.MetaFunctionColumn, MetaImpl.MetaImportedKey, MetaImpl.MetaIndexInfo, MetaImpl.MetaPrimaryKey, MetaImpl.MetaProcedure, MetaImpl.MetaProcedureColumn, MetaImpl.MetaPseudoColumn, MetaImpl.MetaSchema, MetaImpl.MetaSuperTable, MetaImpl.MetaSuperType, MetaImpl.MetaTable, MetaImpl.MetaTablePrivilege, MetaImpl.MetaTableType, MetaImpl.MetaTypeInfo, MetaImpl.MetaUdt, MetaImpl.MetaVersionColumn, MetaImpl.NamedMeta.ConnectionHandle, Meta.ConnectionProperties, Meta.CursorFactory, Meta.DatabaseProperty, Meta.ExecuteBatchResult, Meta.ExecuteResult, Meta.Factory, Meta.Frame, Meta.MetaResultSet, Meta.Pat, Meta.PrepareCallback, Meta.Signature, Meta.StatementHandle, Meta.StatementType, Meta.Style| Modifier and Type | Field and Description |
|---|---|
private Map<Meta.DatabaseProperty,Object> |
databaseProperties |
(package private) Map<String,ConnectionPropertiesImpl> |
propsMap |
(package private) Service |
service |
connection, connProps| Constructor and Description |
|---|
RemoteMeta(AvaticaConnection connection,
Service service) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection(Meta.ConnectionHandle ch)
Closes a connection
|
void |
closeStatement(Meta.StatementHandle h)
Closes a statement.
|
void |
commit(Meta.ConnectionHandle ch)
Makes all changes since the last commit/rollback permanent.
|
Meta.ConnectionProperties |
connectionSync(Meta.ConnectionHandle ch,
Meta.ConnectionProperties connProps)
Synchronizes client and server view of connection properties.
|
Meta.StatementHandle |
createStatement(Meta.ConnectionHandle ch)
Called during the creation of a statement to allocate a new handle.
|
Meta.ExecuteResult |
execute(Meta.StatementHandle h,
List<TypedValue> parameterValues,
int maxRowsInFirstFrame)
Executes a prepared statement.
|
Meta.ExecuteResult |
execute(Meta.StatementHandle h,
List<TypedValue> parameterValues,
long maxRowCount)
Executes a prepared statement.
|
Meta.ExecuteBatchResult |
executeBatch(Meta.StatementHandle h,
List<List<TypedValue>> parameterValues)
Executes a collection of bound parameter values on a prepared statement.
|
Meta.Frame |
fetch(Meta.StatementHandle h,
long offset,
int fetchMaxRowCount)
Returns a frame of rows.
|
Meta.MetaResultSet |
getCatalogs(Meta.ConnectionHandle ch)
|
Meta.MetaResultSet |
getColumns(Meta.ConnectionHandle ch,
String catalog,
Meta.Pat schemaPattern,
Meta.Pat tableNamePattern,
Meta.Pat columnNamePattern)
|
Map<Meta.DatabaseProperty,Object> |
getDatabaseProperties(Meta.ConnectionHandle ch)
Returns a map of static database properties.
|
Meta.MetaResultSet |
getSchemas(Meta.ConnectionHandle ch,
String catalog,
Meta.Pat schemaPattern) |
Meta.MetaResultSet |
getTables(Meta.ConnectionHandle ch,
String catalog,
Meta.Pat schemaPattern,
Meta.Pat tableNamePattern,
List<String> typeList)
|
Meta.MetaResultSet |
getTableTypes(Meta.ConnectionHandle ch)
|
Meta.MetaResultSet |
getTypeInfo(Meta.ConnectionHandle ch)
|
void |
openConnection(Meta.ConnectionHandle ch,
Map<String,String> info)
Opens (creates) a connection.
|
Meta.StatementHandle |
prepare(Meta.ConnectionHandle ch,
String sql,
long maxRowCount)
Prepares a statement.
|
Meta.ExecuteResult |
prepareAndExecute(Meta.StatementHandle h,
String sql,
long maxRowCount,
int maxRowsInFirstFrame,
Meta.PrepareCallback callback)
Prepares and executes a statement.
|
Meta.ExecuteResult |
prepareAndExecute(Meta.StatementHandle h,
String sql,
long maxRowCount,
Meta.PrepareCallback callback)
Prepares and executes a statement.
|
Meta.ExecuteBatchResult |
prepareAndExecuteBatch(Meta.StatementHandle h,
List<String> sqlCommands)
Prepares a statement and then executes a number of SQL commands in one pass.
|
void |
rollback(Meta.ConnectionHandle ch)
Undoes all changes since the last commit/rollback.
|
boolean |
syncResults(Meta.StatementHandle h,
QueryState state,
long offset)
Re-sets the
ResultSet on a Statement. |
private Meta.MetaResultSet |
toResultSet(Class clazz,
Service.ResultSetResponse response) |
checkParameterValueHasNull, collect, collect, columnMetaData, columnMetaData, columnMetaData, columnMetaData, createCursor, createEmptyResultSet, createIterable, createResultSet, fetch, fieldMetaData, getAttributes, getBestRowIdentifier, getClientInfoProperties, getColumnNullability, getColumnPrivileges, getCrossReference, getExportedKeys, getFunctionColumns, getFunctions, getImportedKeys, getIndexInfo, getPrimaryKeys, getProcedureColumns, getProcedures, getPseudoColumns, getSuperTables, getSuperTypes, getTablePrivileges, getUDTs, getVersionColumnsfinal Service service
final Map<String,ConnectionPropertiesImpl> propsMap
private Map<Meta.DatabaseProperty,Object> databaseProperties
public RemoteMeta(AvaticaConnection connection, Service service)
private Meta.MetaResultSet toResultSet(Class clazz, Service.ResultSetResponse response)
public Map<Meta.DatabaseProperty,Object> getDatabaseProperties(Meta.ConnectionHandle ch)
MetaThe provider can omit properties whose value is the same as the default.
getDatabaseProperties in interface MetagetDatabaseProperties in class MetaImplpublic Meta.StatementHandle createStatement(Meta.ConnectionHandle ch)
MetacreateStatement in interface MetacreateStatement in class MetaImplch - Connection handlepublic void closeStatement(Meta.StatementHandle h)
MetaIf the statement handle is not known, or is already closed, does nothing.
h - Statement handlepublic void openConnection(Meta.ConnectionHandle ch, Map<String,String> info)
MetaMeta.ConnectionHandle. The Map info argument is
analogous to the Properties typically passed to a "normal" JDBC Driver. Avatica
specific properties should not be included -- only properties for the underlying driver.openConnection in interface MetaopenConnection in class MetaImplch - A ConnectionHandle encapsulates information about the connection to be opened
as provided by the client.info - A Map corresponding to the Properties typically passed to a JDBC Driver.public void closeConnection(Meta.ConnectionHandle ch)
MetacloseConnection in interface MetacloseConnection in class MetaImplpublic Meta.ConnectionProperties connectionSync(Meta.ConnectionHandle ch, Meta.ConnectionProperties connProps)
MetaNote: this interface is considered "experimental" and may undergo further changes as this
functionality is extended to other aspects of state management for
Connection, Statement, and ResultSet.
connectionSync in interface MetaconnectionSync in class MetaImplpublic Meta.MetaResultSet getCatalogs(Meta.ConnectionHandle ch)
MetagetCatalogs in interface MetagetCatalogs in class MetaImplpublic Meta.MetaResultSet getSchemas(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern)
getSchemas in interface MetagetSchemas in class MetaImplpublic Meta.MetaResultSet getTables(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, List<String> typeList)
Metapublic Meta.MetaResultSet getTableTypes(Meta.ConnectionHandle ch)
MetagetTableTypes in interface MetagetTableTypes in class MetaImplpublic Meta.MetaResultSet getTypeInfo(Meta.ConnectionHandle ch)
MetagetTypeInfo in interface MetagetTypeInfo in class MetaImplpublic Meta.MetaResultSet getColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, Meta.Pat columnNamePattern)
MetagetColumns in interface MetagetColumns in class MetaImplpublic Meta.StatementHandle prepare(Meta.ConnectionHandle ch, String sql, long maxRowCount)
Metach - Connection handlesql - SQL querymaxRowCount - Negative for no limit (different meaning than JDBC)public Meta.ExecuteResult prepareAndExecute(Meta.StatementHandle h, String sql, long maxRowCount, Meta.PrepareCallback callback) throws NoSuchStatementException
Metah - Statement handlesql - SQL querymaxRowCount - Negative for no limit (different meaning than JDBC)callback - Callback to lock, clear and assign cursorNoSuchStatementExceptionpublic Meta.ExecuteResult prepareAndExecute(Meta.StatementHandle h, String sql, long maxRowCount, int maxRowsInFirstFrame, Meta.PrepareCallback callback) throws NoSuchStatementException
Metah - Statement handlesql - SQL querymaxRowCount - Maximum number of rows for the entire query. Negative for no limit
(different meaning than JDBC).maxRowsInFirstFrame - Maximum number of rows for the first frame. This value should
always be less than or equal to maxRowCount as the number of results are guaranteed
to be restricted by maxRowCount and the underlying database.callback - Callback to lock, clear and assign cursorNoSuchStatementExceptionpublic Meta.Frame fetch(Meta.StatementHandle h, long offset, int fetchMaxRowCount) throws NoSuchStatementException, MissingResultsException
MetaThe frame describes whether there may be another frame. If there is not another frame, the current iteration is done when we have finished the rows in the this frame.
The default implementation always returns null.
h - Statement handleoffset - Zero-based offset of first row in the requested framefetchMaxRowCount - Maximum number of rows to return; negative means
no limitNoSuchStatementExceptionMissingResultsExceptionpublic Meta.ExecuteResult execute(Meta.StatementHandle h, List<TypedValue> parameterValues, long maxRowCount) throws NoSuchStatementException
Metah - Statement handleparameterValues - A list of parameter values; may be empty, not nullmaxRowCount - Maximum number of rows to return; negative means
no limitNoSuchStatementExceptionpublic Meta.ExecuteResult execute(Meta.StatementHandle h, List<TypedValue> parameterValues, int maxRowsInFirstFrame) throws NoSuchStatementException
Metah - Statement handleparameterValues - A list of parameter values; may be empty, not nullmaxRowsInFirstFrame - Maximum number of rows to return in the Frame.NoSuchStatementExceptionpublic boolean syncResults(Meta.StatementHandle h, QueryState state, long offset) throws NoSuchStatementException
MetaResultSet on a Statement. Not a JDBC method.NoSuchStatementExceptionpublic void commit(Meta.ConnectionHandle ch)
MetaConnection.commit().ch - A reference to the real JDBC Connectionpublic void rollback(Meta.ConnectionHandle ch)
MetaConnection.rollback();ch - A reference to the real JDBC Connectionpublic Meta.ExecuteBatchResult prepareAndExecuteBatch(Meta.StatementHandle h, List<String> sqlCommands) throws NoSuchStatementException
Metah - Statement handlesqlCommands - SQL commands to runNoSuchStatementExceptionpublic Meta.ExecuteBatchResult executeBatch(Meta.StatementHandle h, List<List<TypedValue>> parameterValues) throws NoSuchStatementException
Metah - Statement handleparameterValues - A collection of list of typed values, one list per batchNoSuchStatementExceptionCopyright © 2012–2017 The Apache Software Foundation. All rights reserved.