@Test public void testExistsDatabase() throws Exception { assertTrue(catalog.existDatabase("space1")); assertTrue(catalog.existDatabase("space2")); assertTrue(catalog.existDatabase("default")); assertFalse(catalog.existDatabase("unknown")); }
public boolean existsDatabase(String dbName) { return providerMap.containsKey(dbName); }
LinkedMetadataManager { public boolean existsDatabase(String dbName) { return providerMap.containsKey(dbName); } }
LinkedMetadataManager { public boolean existsDatabase(String dbName) { return providerMap.containsKey(dbName); } LinkedMetadataManager(Collection<MetadataProvider> providers); }
LinkedMetadataManager { public boolean existsDatabase(String dbName) { return providerMap.containsKey(dbName); } LinkedMetadataManager(Collection<MetadataProvider> providers); Collection<String> getTablespaceNames(); Optional<Pair<String, URI>> getTablespace(final String spaceName); Collection<Pair<String, URI>> getTablespaces(); boolean existsTablespace(String tablespaceName); Collection<String> getDatabases(); boolean existsDatabase(String dbName); Collection<String> getSchemas(@Nullable String dbName); Collection<String> getTableNames(String dbName,
                                          @Nullable final String schemaPattern,
                                          @Nullable final String tablePattern); void createTable(TableDesc desc); void dropTable(String databaseName, String schemaName, String tableName); boolean existsTable(String dbName, String schemaName, String tableName); TableDesc getTable(String dbName, String schemaName, String tbName); }
LinkedMetadataManager { public boolean existsDatabase(String dbName) { return providerMap.containsKey(dbName); } LinkedMetadataManager(Collection<MetadataProvider> providers); Collection<String> getTablespaceNames(); Optional<Pair<String, URI>> getTablespace(final String spaceName); Collection<Pair<String, URI>> getTablespaces(); boolean existsTablespace(String tablespaceName); Collection<String> getDatabases(); boolean existsDatabase(String dbName); Collection<String> getSchemas(@Nullable String dbName); Collection<String> getTableNames(String dbName,
                                          @Nullable final String schemaPattern,
                                          @Nullable final String tablePattern); void createTable(TableDesc desc); void dropTable(String databaseName, String schemaName, String tableName); boolean existsTable(String dbName, String schemaName, String tableName); TableDesc getTable(String dbName, String schemaName, String tbName);  }