public abstract class MetaImpl extends Object implements Meta
Meta.
Each sub-class must implement the two remaining abstract methods,
Meta.prepare(org.apache.calcite.avatica.Meta.ConnectionHandle, java.lang.String, long) and
Meta.prepareAndExecute(org.apache.calcite.avatica.Meta.StatementHandle, java.lang.String, long, org.apache.calcite.avatica.Meta.PrepareCallback).
It should also override metadata methods such as getCatalogs(Meta.ConnectionHandle) and
getTables(org.apache.calcite.avatica.Meta.ConnectionHandle, java.lang.String, org.apache.calcite.avatica.Meta.Pat, org.apache.calcite.avatica.Meta.Pat, java.util.List<java.lang.String>) for the element types for which it has instances; the
default metadata methods return empty collections.
| Modifier and Type | Class and Description |
|---|---|
static interface |
MetaImpl.ColumnNoNulls
Annotation that indicates that a meta field may not contain null
values.
|
static interface |
MetaImpl.ColumnNullable
Annotation that indicates that a meta field may contain null values.
|
static interface |
MetaImpl.ColumnNullableUnknown
Annotation that indicates that it is unknown whether a meta field may contain
null values.
|
static class |
MetaImpl.MetaAttribute
Metadata describing an attribute.
|
static class |
MetaImpl.MetaBestRowIdentifier
Metadata describing the best identifier for a row.
|
static class |
MetaImpl.MetaCatalog
Metadata describing a catalog.
|
static class |
MetaImpl.MetaClientInfoProperty
Metadata describing a client info property.
|
static class |
MetaImpl.MetaColumn
Metadata describing a column.
|
static class |
MetaImpl.MetaColumnPrivilege
Metadata describing a column privilege.
|
static class |
MetaImpl.MetaCrossReference
Metadata describing a cross reference.
|
static class |
MetaImpl.MetaExportedKey
Metadata describing an exported key.
|
static class |
MetaImpl.MetaFunction
Metadata describing a function.
|
static class |
MetaImpl.MetaFunctionColumn
Metadata describing a function column.
|
static class |
MetaImpl.MetaImportedKey
Metadata describing an imported key.
|
static class |
MetaImpl.MetaIndexInfo
Metadata describing index info.
|
static class |
MetaImpl.MetaPrimaryKey
Metadata describing a primary key.
|
static class |
MetaImpl.MetaProcedure
Metadata describing a procedure.
|
static class |
MetaImpl.MetaProcedureColumn
Metadata describing a procedure column.
|
static class |
MetaImpl.MetaPseudoColumn
Metadata describing a pseudo column.
|
static class |
MetaImpl.MetaSchema
Metadata describing a schema.
|
static class |
MetaImpl.MetaSuperTable
Metadata describing a super-table.
|
static class |
MetaImpl.MetaSuperType
Metadata describing a super-type.
|
static class |
MetaImpl.MetaTable
Metadata describing a table.
|
static class |
MetaImpl.MetaTablePrivilege
Metadata describing a table privilege.
|
static class |
MetaImpl.MetaTableType
Metadata describing a table type.
|
static class |
MetaImpl.MetaTypeInfo
Metadata describing type info.
|
static class |
MetaImpl.MetaUdt
Metadata describing a user-defined type.
|
static class |
MetaImpl.MetaVersionColumn
Metadata describing a version column.
|
static interface |
MetaImpl.Named
An object that has a name.
|
Meta.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 |
|---|---|
protected AvaticaConnection |
connection
The
AvaticaConnection backing this. |
protected ConnectionPropertiesImpl |
connProps
Represents the various states specific to
connection. |
| Constructor and Description |
|---|
MetaImpl(AvaticaConnection connection) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseStatement, commit, execute, execute, executeBatch, fetch, prepare, prepareAndExecute, prepareAndExecute, prepareAndExecuteBatch, rollback, syncResultsprotected final AvaticaConnection connection
AvaticaConnection backing this.protected final ConnectionPropertiesImpl connProps
connection.
Note: this instance is used recursively with connection's getter and setter
methods.
public MetaImpl(AvaticaConnection connection)
public static Cursor createCursor(Meta.CursorFactory cursorFactory, Iterable<Object> iterable)
public static List<List<Object>> collect(Meta.CursorFactory cursorFactory, Iterator<Object> iterator, List<List<Object>> list)
public static List<List<Object>> collect(Meta.CursorFactory cursorFactory, Iterable<Object> iterable, List<List<Object>> list)
public 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 Metach - 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 Metapublic 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 Metapublic Meta.StatementHandle createStatement(Meta.ConnectionHandle ch)
MetacreateStatement in interface Metach - Connection handleprotected <E> Meta.MetaResultSet createEmptyResultSet(Class<E> clazz)
public static ColumnMetaData columnMetaData(String name, int index, Class<?> type, boolean columnNullable)
public static ColumnMetaData columnMetaData(String name, int index, ColumnMetaData.AvaticaType type, boolean columnNullable)
public static ColumnMetaData columnMetaData(String name, int index, ColumnMetaData.AvaticaType type, boolean columnNullable, boolean signed)
public static ColumnMetaData columnMetaData(String name, int index, Class<?> type, int columnNullable)
public static ColumnMetaData columnMetaData(String name, int index, ColumnMetaData.AvaticaType type, int columnNullable)
public static ColumnMetaData columnMetaData(String name, int index, ColumnMetaData.AvaticaType type, int columnNullable, boolean signed)
protected static ColumnMetaData.StructType fieldMetaData(Class<?> clazz)
protected static int getColumnNullability(Field field)
protected Meta.MetaResultSet createResultSet(Map<String,Object> internalParameters, List<ColumnMetaData> columns, Meta.CursorFactory cursorFactory, Meta.Frame firstFrame)
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 Metapublic Meta.MetaResultSet getTables(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, List<String> typeList)
Metapublic Meta.MetaResultSet getColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, Meta.Pat columnNamePattern)
MetagetColumns in interface Metapublic Meta.MetaResultSet getSchemas(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern)
getSchemas in interface Metapublic Meta.MetaResultSet getCatalogs(Meta.ConnectionHandle ch)
MetagetCatalogs in interface Metapublic Meta.MetaResultSet getTableTypes(Meta.ConnectionHandle ch)
MetagetTableTypes in interface Metapublic Meta.MetaResultSet getProcedures(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat procedureNamePattern)
MetagetProcedures in interface Metapublic Meta.MetaResultSet getProcedureColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat procedureNamePattern, Meta.Pat columnNamePattern)
MetagetProcedureColumns in interface Metapublic Meta.MetaResultSet getColumnPrivileges(Meta.ConnectionHandle ch, String catalog, String schema, String table, Meta.Pat columnNamePattern)
MetagetColumnPrivileges in interface Metapublic Meta.MetaResultSet getTablePrivileges(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern)
MetagetTablePrivileges in interface Metapublic Meta.MetaResultSet getBestRowIdentifier(Meta.ConnectionHandle ch, String catalog, String schema, String table, int scope, boolean nullable)
MetagetBestRowIdentifier in interface Metapublic Meta.MetaResultSet getVersionColumns(Meta.ConnectionHandle ch, String catalog, String schema, String table)
MetagetVersionColumns in interface Metapublic Meta.MetaResultSet getPrimaryKeys(Meta.ConnectionHandle ch, String catalog, String schema, String table)
MetagetPrimaryKeys in interface Metapublic Meta.MetaResultSet getImportedKeys(Meta.ConnectionHandle ch, String catalog, String schema, String table)
MetagetImportedKeys in interface Metapublic Meta.MetaResultSet getExportedKeys(Meta.ConnectionHandle ch, String catalog, String schema, String table)
MetagetExportedKeys in interface Metapublic Meta.MetaResultSet getCrossReference(Meta.ConnectionHandle ch, String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable)
MetagetCrossReference in interface Metapublic Meta.MetaResultSet getTypeInfo(Meta.ConnectionHandle ch)
MetagetTypeInfo in interface Metapublic Meta.MetaResultSet getIndexInfo(Meta.ConnectionHandle ch, String catalog, String schema, String table, boolean unique, boolean approximate)
MetagetIndexInfo in interface Metapublic Meta.MetaResultSet getUDTs(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat typeNamePattern, int[] types)
Metapublic Meta.MetaResultSet getSuperTypes(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat typeNamePattern)
MetagetSuperTypes in interface Metapublic Meta.MetaResultSet getSuperTables(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern)
MetagetSuperTables in interface Metapublic Meta.MetaResultSet getAttributes(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat typeNamePattern, Meta.Pat attributeNamePattern)
MetagetAttributes in interface Metapublic Meta.MetaResultSet getClientInfoProperties(Meta.ConnectionHandle ch)
MetagetClientInfoProperties in interface Metapublic Meta.MetaResultSet getFunctions(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat functionNamePattern)
MetagetFunctions in interface Metapublic Meta.MetaResultSet getFunctionColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat functionNamePattern, Meta.Pat columnNamePattern)
MetagetFunctionColumns in interface Metapublic Meta.MetaResultSet getPseudoColumns(Meta.ConnectionHandle ch, String catalog, Meta.Pat schemaPattern, Meta.Pat tableNamePattern, Meta.Pat columnNamePattern)
MetagetPseudoColumns in interface Metapublic Iterable<Object> createIterable(Meta.StatementHandle handle, QueryState state, Meta.Signature signature, List<TypedValue> parameterValues, Meta.Frame firstFrame)
MetaThe default implementation just returns iterable, which it
requires to be not null; derived classes may instead choose to execute the
relational expression in signature.
createIterable in interface Metapublic Meta.Frame fetch(AvaticaStatement stmt, List<TypedValue> parameterValues, long offset, int fetchMaxRowCount) throws NoSuchStatementException, MissingResultsException
public static boolean checkParameterValueHasNull(List<TypedValue> parameterValues)
Copyright © 2012-2025 Apache Software Foundation. All Rights Reserved.