public class CalciteMetaImpl
extends org.apache.calcite.avatica.MetaImpl
getXxx methods such as
AvaticaDatabaseMetaData.getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[]).| Modifier and Type | Class and Description |
|---|---|
private static class |
CalciteMetaImpl.CalciteMetaSchema
Metadata describing a Calcite schema.
|
private static class |
CalciteMetaImpl.CalciteMetaTable
Metadata describing a Calcite table.
|
private static class |
CalciteMetaImpl.LimitIterator<E>
Iterator that returns at most
limit rows from an underlying
Iterator. |
(package private) static class |
CalciteMetaImpl.MetadataTable<E>
Table whose contents are metadata.
|
org.apache.calcite.avatica.MetaImpl.ColumnNoNulls, org.apache.calcite.avatica.MetaImpl.ColumnNullable, org.apache.calcite.avatica.MetaImpl.ColumnNullableUnknown, org.apache.calcite.avatica.MetaImpl.MetaAttribute, org.apache.calcite.avatica.MetaImpl.MetaBestRowIdentifier, org.apache.calcite.avatica.MetaImpl.MetaCatalog, org.apache.calcite.avatica.MetaImpl.MetaClientInfoProperty, org.apache.calcite.avatica.MetaImpl.MetaColumn, org.apache.calcite.avatica.MetaImpl.MetaColumnPrivilege, org.apache.calcite.avatica.MetaImpl.MetaCrossReference, org.apache.calcite.avatica.MetaImpl.MetaExportedKey, org.apache.calcite.avatica.MetaImpl.MetaFunction, org.apache.calcite.avatica.MetaImpl.MetaFunctionColumn, org.apache.calcite.avatica.MetaImpl.MetaImportedKey, org.apache.calcite.avatica.MetaImpl.MetaIndexInfo, org.apache.calcite.avatica.MetaImpl.MetaPrimaryKey, org.apache.calcite.avatica.MetaImpl.MetaProcedure, org.apache.calcite.avatica.MetaImpl.MetaProcedureColumn, org.apache.calcite.avatica.MetaImpl.MetaPseudoColumn, org.apache.calcite.avatica.MetaImpl.MetaSchema, org.apache.calcite.avatica.MetaImpl.MetaSuperTable, org.apache.calcite.avatica.MetaImpl.MetaSuperType, org.apache.calcite.avatica.MetaImpl.MetaTable, org.apache.calcite.avatica.MetaImpl.MetaTablePrivilege, org.apache.calcite.avatica.MetaImpl.MetaTableType, org.apache.calcite.avatica.MetaImpl.MetaTypeInfo, org.apache.calcite.avatica.MetaImpl.MetaUdt, org.apache.calcite.avatica.MetaImpl.MetaVersionColumn, org.apache.calcite.avatica.MetaImpl.Namedorg.apache.calcite.avatica.Meta.ConnectionHandle, org.apache.calcite.avatica.Meta.ConnectionProperties, org.apache.calcite.avatica.Meta.CursorFactory, org.apache.calcite.avatica.Meta.DatabaseProperty, org.apache.calcite.avatica.Meta.ExecuteBatchResult, org.apache.calcite.avatica.Meta.ExecuteResult, org.apache.calcite.avatica.Meta.Factory, org.apache.calcite.avatica.Meta.Frame, org.apache.calcite.avatica.Meta.MetaResultSet, org.apache.calcite.avatica.Meta.Pat, org.apache.calcite.avatica.Meta.PrepareCallback, org.apache.calcite.avatica.Meta.Signature, org.apache.calcite.avatica.Meta.StatementHandle, org.apache.calcite.avatica.Meta.StatementType, org.apache.calcite.avatica.Meta.Style| Constructor and Description |
|---|
CalciteMetaImpl(CalciteConnectionImpl connection) |
| Modifier and Type | Method and Description |
|---|---|
(package private) Iterable<Object> |
_createIterable(org.apache.calcite.avatica.Meta.StatementHandle handle,
org.apache.calcite.avatica.Meta.Signature signature,
List<org.apache.calcite.avatica.remote.TypedValue> parameterValues,
org.apache.calcite.avatica.Meta.Frame firstFrame) |
private com.google.common.collect.ImmutableMap.Builder<org.apache.calcite.avatica.Meta.DatabaseProperty,Object> |
addProperty(com.google.common.collect.ImmutableMap.Builder<org.apache.calcite.avatica.Meta.DatabaseProperty,Object> builder,
org.apache.calcite.avatica.Meta.DatabaseProperty p) |
protected Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTypeInfo> |
allTypeInfo() |
(package private) Enumerable<org.apache.calcite.avatica.MetaImpl.MetaCatalog> |
catalogs() |
void |
closeStatement(org.apache.calcite.avatica.Meta.StatementHandle h) |
Enumerable<org.apache.calcite.avatica.MetaImpl.MetaColumn> |
columns(org.apache.calcite.avatica.MetaImpl.MetaTable table_) |
void |
commit(org.apache.calcite.avatica.Meta.ConnectionHandle ch) |
static CalciteConnection |
connect(CalciteSchema schema,
JavaTypeFactory typeFactory)
A trojan-horse method, subject to change without notice.
|
static DataContext |
createDataContext(CalciteConnection connection)
A trojan-horse method, subject to change without notice.
|
protected <E> org.apache.calcite.avatica.Meta.MetaResultSet |
createEmptyResultSet(Class<E> clazz) |
Iterable<Object> |
createIterable(org.apache.calcite.avatica.Meta.StatementHandle handle,
org.apache.calcite.avatica.QueryState state,
org.apache.calcite.avatica.Meta.Signature signature,
List<org.apache.calcite.avatica.remote.TypedValue> parameterValues,
org.apache.calcite.avatica.Meta.Frame firstFrame) |
private <E> org.apache.calcite.avatica.Meta.MetaResultSet |
createResultSet(Enumerable<E> enumerable,
Class clazz,
String... names) |
protected org.apache.calcite.avatica.Meta.MetaResultSet |
createResultSet(Map<String,Object> internalParameters,
List<org.apache.calcite.avatica.ColumnMetaData> columns,
org.apache.calcite.avatica.Meta.CursorFactory cursorFactory,
org.apache.calcite.avatica.Meta.Frame firstFrame) |
org.apache.calcite.avatica.Meta.StatementHandle |
createStatement(org.apache.calcite.avatica.Meta.ConnectionHandle ch) |
org.apache.calcite.avatica.Meta.ExecuteResult |
execute(org.apache.calcite.avatica.Meta.StatementHandle h,
List<org.apache.calcite.avatica.remote.TypedValue> parameterValues,
int maxRowsInFirstFrame) |
org.apache.calcite.avatica.Meta.ExecuteResult |
execute(org.apache.calcite.avatica.Meta.StatementHandle h,
List<org.apache.calcite.avatica.remote.TypedValue> parameterValues,
long maxRowCount) |
org.apache.calcite.avatica.Meta.ExecuteBatchResult |
executeBatch(org.apache.calcite.avatica.Meta.StatementHandle h,
List<List<org.apache.calcite.avatica.remote.TypedValue>> parameterValueLists) |
org.apache.calcite.avatica.Meta.Frame |
fetch(org.apache.calcite.avatica.Meta.StatementHandle h,
long offset,
int fetchMaxRowCount) |
private com.google.common.collect.ImmutableList<org.apache.calcite.avatica.MetaImpl.MetaTypeInfo> |
getAllDefaultType() |
org.apache.calcite.avatica.Meta.MetaResultSet |
getCatalogs(org.apache.calcite.avatica.Meta.ConnectionHandle ch) |
org.apache.calcite.avatica.Meta.MetaResultSet |
getColumns(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String catalog,
org.apache.calcite.avatica.Meta.Pat schemaPattern,
org.apache.calcite.avatica.Meta.Pat tableNamePattern,
org.apache.calcite.avatica.Meta.Pat columnNamePattern) |
(package private) CalciteConnectionImpl |
getConnection() |
Map<org.apache.calcite.avatica.Meta.DatabaseProperty,Object> |
getDatabaseProperties(org.apache.calcite.avatica.Meta.ConnectionHandle ch) |
org.apache.calcite.avatica.Meta.MetaResultSet |
getSchemas(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String catalog,
org.apache.calcite.avatica.Meta.Pat schemaPattern) |
org.apache.calcite.avatica.Meta.MetaResultSet |
getTables(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String catalog,
org.apache.calcite.avatica.Meta.Pat schemaPattern,
org.apache.calcite.avatica.Meta.Pat tableNamePattern,
List<String> typeList) |
org.apache.calcite.avatica.Meta.MetaResultSet |
getTableTypes(org.apache.calcite.avatica.Meta.ConnectionHandle ch) |
org.apache.calcite.avatica.Meta.MetaResultSet |
getTypeInfo(org.apache.calcite.avatica.Meta.ConnectionHandle ch) |
static Pattern |
likeToRegex(org.apache.calcite.avatica.Meta.Pat pattern)
Converts a LIKE-style pattern (where '%' represents a wild-card, escaped
using '\') to a Java regex.
|
(package private) static Predicate1<String> |
matcher(org.apache.calcite.avatica.Meta.Pat pattern) |
(package private) static <T extends org.apache.calcite.avatica.MetaImpl.Named> |
namedMatcher(org.apache.calcite.avatica.Meta.Pat pattern) |
org.apache.calcite.avatica.Meta.StatementHandle |
prepare(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String sql,
long maxRowCount) |
org.apache.calcite.avatica.Meta.ExecuteResult |
prepareAndExecute(org.apache.calcite.avatica.Meta.StatementHandle h,
String sql,
long maxRowCount,
int maxRowsInFirstFrame,
org.apache.calcite.avatica.Meta.PrepareCallback callback) |
org.apache.calcite.avatica.Meta.ExecuteResult |
prepareAndExecute(org.apache.calcite.avatica.Meta.StatementHandle h,
String sql,
long maxRowCount,
org.apache.calcite.avatica.Meta.PrepareCallback callback) |
org.apache.calcite.avatica.Meta.ExecuteBatchResult |
prepareAndExecuteBatch(org.apache.calcite.avatica.Meta.StatementHandle h,
List<String> sqlCommands) |
void |
rollback(org.apache.calcite.avatica.Meta.ConnectionHandle ch) |
(package private) Enumerable<org.apache.calcite.avatica.MetaImpl.MetaSchema> |
schemas(String catalog) |
boolean |
syncResults(org.apache.calcite.avatica.Meta.StatementHandle h,
org.apache.calcite.avatica.QueryState state,
long offset) |
(package private) Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTable> |
tables(org.apache.calcite.avatica.MetaImpl.MetaSchema schema_) |
(package private) Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTable> |
tables(org.apache.calcite.avatica.MetaImpl.MetaSchema schema,
Predicate1<String> matcher) |
(package private) Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTable> |
tables(String catalog) |
(package private) Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTableType> |
tableTypes() |
private CalcitePrepare.Query<Object> |
toQuery(CalcitePrepare.Context context,
String sql)
Wraps the SQL string in a
CalcitePrepare.Query object, giving the
Hook.STRING_TO_QUERY hook chance to override. |
checkParameterValueHasNull, closeConnection, collect, collect, columnMetaData, columnMetaData, columnMetaData, columnMetaData, connectionSync, createCursor, fetch, fieldMetaData, getAttributes, getBestRowIdentifier, getClientInfoProperties, getColumnNullability, getColumnPrivileges, getCrossReference, getExportedKeys, getFunctionColumns, getFunctions, getImportedKeys, getIndexInfo, getPrimaryKeys, getProcedureColumns, getProcedures, getPseudoColumns, getSuperTables, getSuperTypes, getTablePrivileges, getUDTs, getVersionColumns, openConnectionstatic final Driver DRIVER
public CalciteMetaImpl(CalciteConnectionImpl connection)
static <T extends org.apache.calcite.avatica.MetaImpl.Named> Predicate1<T> namedMatcher(org.apache.calcite.avatica.Meta.Pat pattern)
static Predicate1<String> matcher(org.apache.calcite.avatica.Meta.Pat pattern)
public static Pattern likeToRegex(org.apache.calcite.avatica.Meta.Pat pattern)
public org.apache.calcite.avatica.Meta.StatementHandle createStatement(org.apache.calcite.avatica.Meta.ConnectionHandle ch)
createStatement in interface org.apache.calcite.avatica.MetacreateStatement in class org.apache.calcite.avatica.MetaImplpublic void closeStatement(org.apache.calcite.avatica.Meta.StatementHandle h)
private <E> org.apache.calcite.avatica.Meta.MetaResultSet createResultSet(Enumerable<E> enumerable, Class clazz, String... names)
protected <E> org.apache.calcite.avatica.Meta.MetaResultSet createEmptyResultSet(Class<E> clazz)
createEmptyResultSet in class org.apache.calcite.avatica.MetaImplprotected org.apache.calcite.avatica.Meta.MetaResultSet createResultSet(Map<String,Object> internalParameters, List<org.apache.calcite.avatica.ColumnMetaData> columns, org.apache.calcite.avatica.Meta.CursorFactory cursorFactory, org.apache.calcite.avatica.Meta.Frame firstFrame)
createResultSet in class org.apache.calcite.avatica.MetaImplCalciteConnectionImpl getConnection()
public Map<org.apache.calcite.avatica.Meta.DatabaseProperty,Object> getDatabaseProperties(org.apache.calcite.avatica.Meta.ConnectionHandle ch)
getDatabaseProperties in interface org.apache.calcite.avatica.MetagetDatabaseProperties in class org.apache.calcite.avatica.MetaImplprivate com.google.common.collect.ImmutableMap.Builder<org.apache.calcite.avatica.Meta.DatabaseProperty,Object> addProperty(com.google.common.collect.ImmutableMap.Builder<org.apache.calcite.avatica.Meta.DatabaseProperty,Object> builder, org.apache.calcite.avatica.Meta.DatabaseProperty p)
public org.apache.calcite.avatica.Meta.MetaResultSet getTables(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String catalog,
org.apache.calcite.avatica.Meta.Pat schemaPattern,
org.apache.calcite.avatica.Meta.Pat tableNamePattern,
List<String> typeList)
getTables in interface org.apache.calcite.avatica.MetagetTables in class org.apache.calcite.avatica.MetaImplpublic org.apache.calcite.avatica.Meta.MetaResultSet getTypeInfo(org.apache.calcite.avatica.Meta.ConnectionHandle ch)
getTypeInfo in interface org.apache.calcite.avatica.MetagetTypeInfo in class org.apache.calcite.avatica.MetaImplpublic org.apache.calcite.avatica.Meta.MetaResultSet getColumns(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String catalog,
org.apache.calcite.avatica.Meta.Pat schemaPattern,
org.apache.calcite.avatica.Meta.Pat tableNamePattern,
org.apache.calcite.avatica.Meta.Pat columnNamePattern)
getColumns in interface org.apache.calcite.avatica.MetagetColumns in class org.apache.calcite.avatica.MetaImplEnumerable<org.apache.calcite.avatica.MetaImpl.MetaCatalog> catalogs()
Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTableType> tableTypes()
Enumerable<org.apache.calcite.avatica.MetaImpl.MetaSchema> schemas(String catalog)
Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTable> tables(String catalog)
Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTable> tables(org.apache.calcite.avatica.MetaImpl.MetaSchema schema_)
Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTable> tables(org.apache.calcite.avatica.MetaImpl.MetaSchema schema, Predicate1<String> matcher)
private com.google.common.collect.ImmutableList<org.apache.calcite.avatica.MetaImpl.MetaTypeInfo> getAllDefaultType()
protected Enumerable<org.apache.calcite.avatica.MetaImpl.MetaTypeInfo> allTypeInfo()
public Enumerable<org.apache.calcite.avatica.MetaImpl.MetaColumn> columns(org.apache.calcite.avatica.MetaImpl.MetaTable table_)
public org.apache.calcite.avatica.Meta.MetaResultSet getSchemas(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String catalog,
org.apache.calcite.avatica.Meta.Pat schemaPattern)
getSchemas in interface org.apache.calcite.avatica.MetagetSchemas in class org.apache.calcite.avatica.MetaImplpublic org.apache.calcite.avatica.Meta.MetaResultSet getCatalogs(org.apache.calcite.avatica.Meta.ConnectionHandle ch)
getCatalogs in interface org.apache.calcite.avatica.MetagetCatalogs in class org.apache.calcite.avatica.MetaImplpublic org.apache.calcite.avatica.Meta.MetaResultSet getTableTypes(org.apache.calcite.avatica.Meta.ConnectionHandle ch)
getTableTypes in interface org.apache.calcite.avatica.MetagetTableTypes in class org.apache.calcite.avatica.MetaImplpublic Iterable<Object> createIterable(org.apache.calcite.avatica.Meta.StatementHandle handle, org.apache.calcite.avatica.QueryState state, org.apache.calcite.avatica.Meta.Signature signature, List<org.apache.calcite.avatica.remote.TypedValue> parameterValues, org.apache.calcite.avatica.Meta.Frame firstFrame)
createIterable in interface org.apache.calcite.avatica.MetacreateIterable in class org.apache.calcite.avatica.MetaImplIterable<Object> _createIterable(org.apache.calcite.avatica.Meta.StatementHandle handle, org.apache.calcite.avatica.Meta.Signature signature, List<org.apache.calcite.avatica.remote.TypedValue> parameterValues, org.apache.calcite.avatica.Meta.Frame firstFrame)
public org.apache.calcite.avatica.Meta.StatementHandle prepare(org.apache.calcite.avatica.Meta.ConnectionHandle ch,
String sql,
long maxRowCount)
public org.apache.calcite.avatica.Meta.ExecuteResult prepareAndExecute(org.apache.calcite.avatica.Meta.StatementHandle h,
String sql,
long maxRowCount,
org.apache.calcite.avatica.Meta.PrepareCallback callback)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionpublic org.apache.calcite.avatica.Meta.ExecuteResult prepareAndExecute(org.apache.calcite.avatica.Meta.StatementHandle h,
String sql,
long maxRowCount,
int maxRowsInFirstFrame,
org.apache.calcite.avatica.Meta.PrepareCallback callback)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionprivate CalcitePrepare.Query<Object> toQuery(CalcitePrepare.Context context, String sql)
CalcitePrepare.Query object, giving the
Hook.STRING_TO_QUERY hook chance to override.public org.apache.calcite.avatica.Meta.Frame fetch(org.apache.calcite.avatica.Meta.StatementHandle h,
long offset,
int fetchMaxRowCount)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionpublic org.apache.calcite.avatica.Meta.ExecuteResult execute(org.apache.calcite.avatica.Meta.StatementHandle h,
List<org.apache.calcite.avatica.remote.TypedValue> parameterValues,
long maxRowCount)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionpublic org.apache.calcite.avatica.Meta.ExecuteResult execute(org.apache.calcite.avatica.Meta.StatementHandle h,
List<org.apache.calcite.avatica.remote.TypedValue> parameterValues,
int maxRowsInFirstFrame)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionpublic org.apache.calcite.avatica.Meta.ExecuteBatchResult executeBatch(org.apache.calcite.avatica.Meta.StatementHandle h,
List<List<org.apache.calcite.avatica.remote.TypedValue>> parameterValueLists)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionpublic org.apache.calcite.avatica.Meta.ExecuteBatchResult prepareAndExecuteBatch(org.apache.calcite.avatica.Meta.StatementHandle h,
List<String> sqlCommands)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionpublic static DataContext createDataContext(CalciteConnection connection)
public static CalciteConnection connect(CalciteSchema schema, JavaTypeFactory typeFactory)
public boolean syncResults(org.apache.calcite.avatica.Meta.StatementHandle h,
org.apache.calcite.avatica.QueryState state,
long offset)
throws org.apache.calcite.avatica.NoSuchStatementException
org.apache.calcite.avatica.NoSuchStatementExceptionpublic void commit(org.apache.calcite.avatica.Meta.ConnectionHandle ch)
public void rollback(org.apache.calcite.avatica.Meta.ConnectionHandle ch)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.