Package io.trino.plugin.mongodb
Class MongoMetadata
- java.lang.Object
-
- io.trino.plugin.mongodb.MongoMetadata
-
- All Implemented Interfaces:
ConnectorMetadata
public class MongoMetadata extends Object implements ConnectorMetadata
-
-
Constructor Summary
Constructors Constructor Description MongoMetadata(MongoSession mongoSession)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.trino.spi.connector.ConnectorMetadata
applyAggregation, applyDelete, applyJoin, applyProjection, applySample, applyTableScanRedirect, applyTopN, beginDelete, beginInsert, beginQuery, beginRefreshMaterializedView, beginStatisticsCollection, beginUpdate, cleanupQuery, createMaterializedView, createRole, createSchema, createView, delegateMaterializedViewRefreshToConnector, dropMaterializedView, dropRole, dropSchema, dropView, executeDelete, finishDelete, finishRefreshMaterializedView, finishStatisticsCollection, finishUpdate, getCommonPartitioningHandle, getDeleteRowIdColumnHandle, getInfo, getInfo, getInsertLayout, getMaterializedView, getMaterializedViewFreshness, getMaterializedViews, getNewTableLayout, getSchemaOwner, getSchemaProperties, getStatisticsCollectionMetadata, getStatisticsCollectionMetadataForWrite, getSystemTable, getTableHandleForStatisticsCollection, getTableLayout, getTableLayouts, getTableSchema, getTableStatistics, getUpdateRowIdColumnHandle, getView, getViews, grantRoles, grantSchemaPrivileges, grantTablePrivileges, listAllRoleGrants, listApplicableRoles, listEnabledRoles, listMaterializedViews, listRoleGrants, listRoles, listTablePrivileges, listViews, makeCompatiblePartitioning, makeCompatiblePartitioning, metadataDelete, redirectTable, refreshMaterializedView, renameColumn, renameSchema, renameTable, renameView, resolveIndex, revokeRoles, revokeSchemaPrivileges, revokeTablePrivileges, schemaExists, setColumnComment, setSchemaAuthorization, setTableAuthorization, setTableComment, setViewAuthorization, streamTableColumns, supportsMetadataDelete, supportsMissingColumnsOnInsert, validateScan
-
-
-
-
Constructor Detail
-
MongoMetadata
public MongoMetadata(MongoSession mongoSession)
-
-
Method Detail
-
listSchemaNames
public List<String> listSchemaNames(ConnectorSession session)
- Specified by:
listSchemaNamesin interfaceConnectorMetadata
-
getTableHandle
public MongoTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
- Specified by:
getTableHandlein interfaceConnectorMetadata
-
getTableMetadata
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getTableMetadatain interfaceConnectorMetadata
-
listTables
public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> optionalSchemaName)
- Specified by:
listTablesin interfaceConnectorMetadata
-
getColumnHandles
public Map<String,ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getColumnHandlesin interfaceConnectorMetadata
-
listTableColumns
public Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
- Specified by:
listTableColumnsin interfaceConnectorMetadata
-
getColumnMetadata
public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
- Specified by:
getColumnMetadatain interfaceConnectorMetadata
-
createTable
public void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
- Specified by:
createTablein interfaceConnectorMetadata
-
dropTable
public void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
dropTablein interfaceConnectorMetadata
-
addColumn
public void addColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnMetadata column)
- Specified by:
addColumnin interfaceConnectorMetadata
-
dropColumn
public void dropColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle column)
- Specified by:
dropColumnin interfaceConnectorMetadata
-
beginCreateTable
public ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorNewTableLayout> layout)
- Specified by:
beginCreateTablein interfaceConnectorMetadata
-
finishCreateTable
public Optional<ConnectorOutputMetadata> finishCreateTable(ConnectorSession session, ConnectorOutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
- Specified by:
finishCreateTablein interfaceConnectorMetadata
-
beginInsert
public ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
beginInsertin interfaceConnectorMetadata
-
finishInsert
public Optional<ConnectorOutputMetadata> finishInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
- Specified by:
finishInsertin interfaceConnectorMetadata
-
usesLegacyTableLayouts
public boolean usesLegacyTableLayouts()
- Specified by:
usesLegacyTableLayoutsin interfaceConnectorMetadata
-
getTableProperties
public ConnectorTableProperties getTableProperties(ConnectorSession session, ConnectorTableHandle table)
- Specified by:
getTablePropertiesin interfaceConnectorMetadata
-
applyLimit
public Optional<LimitApplicationResult<ConnectorTableHandle>> applyLimit(ConnectorSession session, ConnectorTableHandle table, long limit)
- Specified by:
applyLimitin interfaceConnectorMetadata
-
applyFilter
public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(ConnectorSession session, ConnectorTableHandle table, Constraint constraint)
- Specified by:
applyFilterin interfaceConnectorMetadata
-
rollback
public void rollback()
-
-