com.scalar.db.sql.metadata.NamespaceMetadata Maven / Gradle / Ivy
package com.scalar.db.sql.metadata;
import com.scalar.db.sql.exception.SqlException;
import java.util.Map;
import java.util.Optional;
/** Metadata for a namespace. */
public interface NamespaceMetadata {
/**
* Returns the name of the namespace.
*
* @return the name of the namespace
*/
String getName();
/**
* Returns a map of the table names and {@link TableMetadata} objects.
*
* @return a map of the table names and {@link TableMetadata} objects
* @throws SqlException if an unexpected error happens
*/
Map getTables();
/**
* Returns the {@link TableMetadata} objects for the specified namespace.
*
* @param tableName the name of the target table
* @return the {@link TableMetadata} objects for the specified namespace
* @throws SqlException if an unexpected error happens
*/
Optional getTable(String tableName);
}