JingsongLi commented on code in PR #173: URL: https://github.com/apache/flink-table-store/pull/173#discussion_r905728693
########## flink-table-store-core/src/main/java/org/apache/flink/table/store/file/catalog/Catalog.java: ########## @@ -0,0 +1,184 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.table.store.file.catalog; + +import org.apache.flink.core.fs.Path; +import org.apache.flink.table.catalog.ObjectPath; +import org.apache.flink.table.store.file.schema.TableSchema; +import org.apache.flink.table.store.file.schema.UpdateSchema; + +import java.util.List; + +/** + * This interface is responsible for reading and writing metadata such as database/table from a + * table store catalog. + */ +public interface Catalog extends AutoCloseable { + + /** + * Get the names of all databases in this catalog. + * + * @return a list of the names of all databases + */ + List<String> listDatabases(); + + /** + * Drop a database. + * + * @param name Name of the database to be dropped. + * @param cascade Flag to specify behavior when the database contains table or function: if set + * to true, delete all tables and functions in the database and then delete the database, if + * set to false, throw an exception. + * @throws DatabaseNotEmptyException if the given database is not empty and isRestrict is true Review Comment: I was previously considering database creation all the way to lazy, but exposing it is more comprehensive. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org