public interface Meta
Also holds other abstract methods that are not related to metadata that each provider must implement. This is not ideal.
Modifier and Type | Interface and Description |
---|---|
static class |
Meta.ConnectionHandle
Connection handle.
|
static interface |
Meta.ConnectionProperties
A pojo containing various client-settable
Connection properties. |
static class |
Meta.CursorFactory
|
static class |
Meta.DatabaseProperty
Database property.
|
static class |
Meta.ExecuteBatchResult
Response from a collection of SQL commands or parameter values in a single batch.
|
static class |
Meta.ExecuteResult
Response from execute.
|
static interface |
Meta.Factory
Factory to create instances of
Meta . |
static class |
Meta.Frame
A collection of rows.
|
static class |
Meta.MetaResultSet
Meta data from which a result set can be constructed.
|
static class |
Meta.Pat
Wrapper to remind API calls that a parameter is a pattern (allows '%' and
'_' wildcards, per the JDBC spec) rather than a string to be matched
exactly.
|
static interface |
Meta.PrepareCallback
API to put a result set into a statement, being careful to enforce
thread-safety and not to overwrite existing open result sets.
|
static class |
Meta.Signature
Result of preparing a statement.
|
static class |
Meta.StatementHandle
Statement handle.
|
static class |
Meta.StatementType
Type of statement.
|
static class |
Meta.Style
How logical fields are represented in the objects returned by the
iterator.
|
Map<Meta.DatabaseProperty,Object> getDatabaseProperties(Meta.ConnectionHandle ch)
The provider can omit properties whose value is the same as the default.
Meta.MetaResultSet getTables(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, List<String> typeList)
Meta.MetaResultSet getColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, Meta.Pat columnNamePattern)
Meta.MetaResultSet getSchemas(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern)
Meta.MetaResultSet getCatalogs(Meta.ConnectionHandle ch)
Meta.MetaResultSet getTableTypes(Meta.ConnectionHandle ch)
Meta.MetaResultSet getProcedures(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat procedureNamePattern)
Meta.MetaResultSet getProcedureColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat procedureNamePattern, Meta.Pat columnNamePattern)
Meta.MetaResultSet getColumnPrivileges(Meta.ConnectionHandle ch, String catalog, String schema, String table, Meta.Pat columnNamePattern)
Meta.MetaResultSet getTablePrivileges(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern)
Meta.MetaResultSet getBestRowIdentifier(Meta.ConnectionHandle ch, String catalog, String schema, String table, int scope, boolean nullable)
Meta.MetaResultSet getVersionColumns(Meta.ConnectionHandle ch, String catalog, String schema, String table)
Meta.MetaResultSet getPrimaryKeys(Meta.ConnectionHandle ch, String catalog, String schema, String table)
Meta.MetaResultSet getImportedKeys(Meta.ConnectionHandle ch, String catalog, String schema, String table)
Meta.MetaResultSet getExportedKeys(Meta.ConnectionHandle ch, String catalog, String schema, String table)
Meta.MetaResultSet getCrossReference(Meta.ConnectionHandle ch, String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable)
Meta.MetaResultSet getTypeInfo(Meta.ConnectionHandle ch)
Meta.MetaResultSet getIndexInfo(Meta.ConnectionHandle ch, String catalog, String schema, String table, boolean unique, boolean approximate)
Meta.MetaResultSet getUDTs(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat typeNamePattern, int[] types)
Meta.MetaResultSet getSuperTypes(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat typeNamePattern)
Meta.MetaResultSet getSuperTables(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern)
Meta.MetaResultSet getAttributes(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat typeNamePattern, Meta.Pat attributeNamePattern)
Meta.MetaResultSet getClientInfoProperties(Meta.ConnectionHandle ch)
Meta.MetaResultSet getFunctions(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat functionNamePattern)
Meta.MetaResultSet getFunctionColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat functionNamePattern, Meta.Pat columnNamePattern)
Meta.MetaResultSet getPseudoColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, Meta.Pat columnNamePattern)
Iterable<Object> createIterable(Meta.StatementHandle stmt, QueryState state, Meta.Signature signature, List<TypedValue> parameters, Meta.Frame firstFrame)
The default implementation just returns iterable
, which it
requires to be not null; derived classes may instead choose to execute the
relational expression in signature
.
Meta.StatementHandle prepare(Meta.ConnectionHandle ch, String sql, long maxRowCount)
ch
- Connection handlesql
- SQL querymaxRowCount
- Negative for no limit (different meaning than JDBC)@Deprecated Meta.ExecuteResult prepareAndExecute(Meta.StatementHandle h, String sql, long maxRowCount, Meta.PrepareCallback callback) throws NoSuchStatementException
h
- Statement handlesql
- SQL querymaxRowCount
- Negative for no limit (different meaning than JDBC)callback
- Callback to lock, clear and assign cursorNoSuchStatementException
Meta.ExecuteResult prepareAndExecute(Meta.StatementHandle h, String sql, long maxRowCount, int maxRowsInFirstFrame, Meta.PrepareCallback callback) throws NoSuchStatementException
h
- 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 cursorNoSuchStatementException
Meta.ExecuteBatchResult prepareAndExecuteBatch(Meta.StatementHandle h, List<String> sqlCommands) throws NoSuchStatementException
h
- Statement handlesqlCommands
- SQL commands to runNoSuchStatementException
Meta.ExecuteBatchResult executeBatch(Meta.StatementHandle h, List<List<TypedValue>> parameterValues) throws NoSuchStatementException
h
- Statement handleparameterValues
- A collection of list of typed values, one list per batchNoSuchStatementException
Meta.Frame fetch(Meta.StatementHandle h, long offset, int fetchMaxRowCount) throws NoSuchStatementException, MissingResultsException
The 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 limitNoSuchStatementException
MissingResultsException
@Deprecated Meta.ExecuteResult execute(Meta.StatementHandle h, List<TypedValue> parameterValues, long maxRowCount) throws NoSuchStatementException
execute(StatementHandle, List, int)
h
- Statement handleparameterValues
- A list of parameter values; may be empty, not nullmaxRowCount
- Maximum number of rows to return; negative means
no limitNoSuchStatementException
Meta.ExecuteResult execute(Meta.StatementHandle h, List<TypedValue> parameterValues, int maxRowsInFirstFrame) throws NoSuchStatementException
h
- Statement handleparameterValues
- A list of parameter values; may be empty, not nullmaxRowsInFirstFrame
- Maximum number of rows to return in the Frame.NoSuchStatementException
Meta.StatementHandle createStatement(Meta.ConnectionHandle ch)
ch
- Connection handlevoid closeStatement(Meta.StatementHandle h)
If the statement handle is not known, or is already closed, does nothing.
h
- Statement handlevoid openConnection(Meta.ConnectionHandle ch, Map<String,String> info)
Meta.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.ch
- 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.void closeConnection(Meta.ConnectionHandle ch)
boolean syncResults(Meta.StatementHandle sh, QueryState state, long offset) throws NoSuchStatementException
ResultSet
on a Statement. Not a JDBC method.NoSuchStatementException
void commit(Meta.ConnectionHandle ch)
Connection.commit()
.ch
- A reference to the real JDBC Connectionvoid rollback(Meta.ConnectionHandle ch)
Connection.rollback()
;ch
- A reference to the real JDBC ConnectionMeta.ConnectionProperties connectionSync(Meta.ConnectionHandle ch, Meta.ConnectionProperties connProps)
Note: 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
.
Copyright © 2012-2024 Apache Software Foundation. All Rights Reserved.