public QualifiedTablePrefix(String catalogName) { this.catalogName = checkCatalogName(catalogName); this.schemaName = Optional.empty(); this.tableName = Optional.empty(); }
public QualifiedTablePrefix(String catalogName, String schemaName) { this.catalogName = checkCatalogName(catalogName); this.schemaName = Optional.of(checkSchemaName(schemaName)); this.tableName = Optional.empty(); }
public Catalog( String catalogName, ConnectorId connectorId, Connector connector, ConnectorId informationSchemaId, Connector informationSchema, ConnectorId systemTablesId, Connector systemTables) { this.catalogName = checkCatalogName(catalogName); this.connectorId = requireNonNull(connectorId, "connectorId is null"); this.connector = requireNonNull(connector, "connector is null"); this.informationSchemaId = requireNonNull(informationSchemaId, "informationSchemaId is null"); this.informationSchema = requireNonNull(informationSchema, "informationSchema is null"); this.systemTablesId = requireNonNull(systemTablesId, "systemTablesId is null"); this.systemTables = requireNonNull(systemTables, "systemTables is null"); }
public static void checkTableName(String catalogName, Optional<String> schemaName, Optional<String> tableName) { checkCatalogName(catalogName); schemaName.ifPresent(name -> checkLowerCase(name, "schemaName")); tableName.ifPresent(name -> checkLowerCase(name, "tableName")); checkArgument(schemaName.isPresent() || !tableName.isPresent(), "tableName specified but schemaName is missing"); }
public QualifiedTablePrefix(String catalogName, String schemaName, String tableName) { this.catalogName = checkCatalogName(catalogName); this.schemaName = Optional.of(checkSchemaName(schemaName)); this.tableName = Optional.of(checkTableName(tableName)); }
public QualifiedTablePrefix(String catalogName) { this.catalogName = checkCatalogName(catalogName); this.schemaName = Optional.empty(); this.tableName = Optional.empty(); }
public QualifiedTablePrefix(String catalogName, String schemaName) { this.catalogName = checkCatalogName(catalogName); this.schemaName = Optional.of(checkSchemaName(schemaName)); this.tableName = Optional.empty(); }
public static void checkTableName(String catalogName, Optional<String> schemaName, Optional<String> tableName) { checkCatalogName(catalogName); checkSchemaName(schemaName); checkTableName(tableName); checkArgument(schemaName.isPresent() || !tableName.isPresent(), "tableName specified but schemaName is missing"); }
public QualifiedTablePrefix(String catalogName, String schemaName, String tableName) { this.catalogName = checkCatalogName(catalogName); this.schemaName = Optional.of(checkSchemaName(schemaName)); this.tableName = Optional.of(checkTableName(tableName)); }
@Override public List<String> listSchemaNames(Session session, String catalogName) { checkCatalogName(catalogName); ImmutableSet.Builder<String> schemaNames = ImmutableSet.builder(); for (ConnectorEntry entry : allConnectorsFor(catalogName)) { ConnectorMetadata metadata = entry.getMetadata(session); schemaNames.addAll(metadata.listSchemaNames(session.toConnectorSession(entry.getCatalog()))); } return ImmutableList.copyOf(schemaNames.build()); }