public class ClassLoaderSafeConnectorMetadata extends Object implements ConnectorMetadata
| Constructor and Description |
|---|
ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate,
ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(ConnectorSession session,
ConnectorTableHandle tableHandle,
ColumnMetadata column)
Add the specified column
|
ConnectorOutputTableHandle |
beginCreateTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Begin the atomic creation of a table with data.
|
ConnectorTableHandle |
beginDelete(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin delete query
|
ConnectorInsertTableHandle |
beginInsert(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin insert query
|
boolean |
canCreateSampledTables(ConnectorSession session)
Returns true if this catalog supports creation of sampled tables
|
void |
commitCreateTable(ConnectorSession session,
ConnectorOutputTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments)
Commit a table creation with data after the data is written.
|
void |
commitInsert(ConnectorSession session,
ConnectorInsertTableHandle insertHandle,
Collection<io.airlift.slice.Slice> fragments)
Commit insert query
|
void |
createTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Creates a table using the specified table metadata.
|
void |
createView(ConnectorSession session,
SchemaTableName viewName,
String viewData,
boolean replace)
Create the specified view.
|
void |
dropTable(ConnectorSession session,
ConnectorTableHandle tableHandle)
Drops the specified table
|
void |
dropView(ConnectorSession session,
SchemaTableName viewName)
Drop the specified view.
|
Map<String,ColumnHandle> |
getColumnHandles(ConnectorSession session,
ConnectorTableHandle tableHandle)
Gets all of the columns on the specified table, or an empty map if the columns can not be enumerated.
|
ColumnMetadata |
getColumnMetadata(ConnectorSession session,
ConnectorTableHandle tableHandle,
ColumnHandle columnHandle)
Gets the metadata for the specified table column.
|
ColumnHandle |
getSampleWeightColumnHandle(ConnectorSession session,
ConnectorTableHandle tableHandle)
Returns the handle for the sample weight column, or null if the table does not contain sampled data.
|
ConnectorTableHandle |
getTableHandle(ConnectorSession session,
SchemaTableName tableName)
Returns a table handle for the specified table name, or null if the connector does not contain the table.
|
ConnectorTableLayout |
getTableLayout(ConnectorSession session,
ConnectorTableLayoutHandle handle) |
List<ConnectorTableLayoutResult> |
getTableLayouts(ConnectorSession session,
ConnectorTableHandle table,
Constraint<ColumnHandle> constraint,
Optional<Set<ColumnHandle>> desiredColumns)
Return a list of table layouts that satisfy the given constraint.
|
ConnectorTableMetadata |
getTableMetadata(ConnectorSession session,
ConnectorTableHandle table)
Return the metadata for the specified table handle.
|
ColumnHandle |
getUpdateRowIdColumnHandle(ConnectorSession session,
ConnectorTableHandle tableHandle)
Get the column handle that will generate row IDs for the delete operation.
|
Map<SchemaTableName,ConnectorViewDefinition> |
getViews(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the view data for views that match the specified table prefix.
|
void |
grantTablePrivileges(ConnectorSession session,
SchemaTableName tableName,
Set<Privilege> privileges,
String grantee,
boolean grantOption)
Grants the specified privilege to the specified user on the specified table
|
List<String> |
listSchemaNames(ConnectorSession session)
Returns the schemas provided by this connector.
|
Map<SchemaTableName,List<ColumnMetadata>> |
listTableColumns(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the metadata for all columns that match the specified table prefix.
|
List<SchemaTableName> |
listTables(ConnectorSession session,
String schemaNameOrNull)
List table names, possibly filtered by schema.
|
List<SchemaTableName> |
listViews(ConnectorSession session,
String schemaNameOrNull)
List view names, possibly filtered by schema.
|
OptionalLong |
metadataDelete(ConnectorSession session,
ConnectorTableHandle tableHandle,
ConnectorTableLayoutHandle tableLayoutHandle)
Delete the provided table layout
|
void |
renameColumn(ConnectorSession session,
ConnectorTableHandle tableHandle,
ColumnHandle source,
String target)
Rename the specified column
|
void |
renameTable(ConnectorSession session,
ConnectorTableHandle tableHandle,
SchemaTableName newTableName)
Rename the specified table
|
boolean |
supportsMetadataDelete(ConnectorSession session,
ConnectorTableHandle tableHandle,
ConnectorTableLayoutHandle tableLayoutHandle) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcommitDelete, rollbackCreateTable, rollbackDelete, rollbackInsertpublic ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate, ClassLoader classLoader)
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
ConnectorMetadataFor each layout, connectors must return an "unenforced constraint" representing the part of the constraint summary that isn't guaranteed by the layout.
getTableLayouts in interface ConnectorMetadatapublic ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)
getTableLayout in interface ConnectorMetadatapublic List<String> listSchemaNames(ConnectorSession session)
ConnectorMetadatalistSchemaNames in interface ConnectorMetadatapublic ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
ConnectorMetadatagetTableHandle in interface ConnectorMetadatapublic ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle table)
ConnectorMetadatagetTableMetadata in interface ConnectorMetadatapublic List<SchemaTableName> listTables(ConnectorSession session, String schemaNameOrNull)
ConnectorMetadatalistTables in interface ConnectorMetadatapublic ColumnHandle getSampleWeightColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatagetSampleWeightColumnHandle in interface ConnectorMetadatapublic boolean canCreateSampledTables(ConnectorSession session)
ConnectorMetadatacanCreateSampledTables in interface ConnectorMetadatapublic Map<String,ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatagetColumnHandles in interface ConnectorMetadatapublic ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
ConnectorMetadatagetColumnMetadata in interface ConnectorMetadatapublic Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorMetadatalistTableColumns in interface ConnectorMetadatapublic void addColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnMetadata column)
ConnectorMetadataaddColumn in interface ConnectorMetadatapublic void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatacreateTable in interface ConnectorMetadatapublic void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatadropTable in interface ConnectorMetadatapublic void renameColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle source, String target)
ConnectorMetadatarenameColumn in interface ConnectorMetadatapublic void renameTable(ConnectorSession session, ConnectorTableHandle tableHandle, SchemaTableName newTableName)
ConnectorMetadatarenameTable in interface ConnectorMetadatapublic ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatabeginCreateTable in interface ConnectorMetadatapublic void commitCreateTable(ConnectorSession session, ConnectorOutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
ConnectorMetadatacommitCreateTable in interface ConnectorMetadatapublic ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatabeginInsert in interface ConnectorMetadatapublic void commitInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments)
ConnectorMetadatacommitInsert in interface ConnectorMetadatapublic void createView(ConnectorSession session, SchemaTableName viewName, String viewData, boolean replace)
ConnectorMetadatacreateView in interface ConnectorMetadatapublic void dropView(ConnectorSession session, SchemaTableName viewName)
ConnectorMetadatadropView in interface ConnectorMetadatapublic List<SchemaTableName> listViews(ConnectorSession session, String schemaNameOrNull)
ConnectorMetadatalistViews in interface ConnectorMetadatapublic Map<SchemaTableName,ConnectorViewDefinition> getViews(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorMetadatagetViews in interface ConnectorMetadatapublic ColumnHandle getUpdateRowIdColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatadeleteRows() method of the
UpdatablePageSource that created them.getUpdateRowIdColumnHandle in interface ConnectorMetadatapublic ConnectorTableHandle beginDelete(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatabeginDelete in interface ConnectorMetadatapublic boolean supportsMetadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorTableLayoutHandle tableLayoutHandle)
supportsMetadataDelete in interface ConnectorMetadatapublic OptionalLong metadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorTableLayoutHandle tableLayoutHandle)
ConnectorMetadatametadataDelete in interface ConnectorMetadatapublic void grantTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, String grantee, boolean grantOption)
ConnectorMetadatagrantTablePrivileges in interface ConnectorMetadataCopyright © 2012-2016. All Rights Reserved.