public static class SimpleCatalog.SimpleSchema extends Object implements Schema
Schema.| Constructor and Description |
|---|
SimpleSchema(String name,
SimpleCatalog catalog) |
| Modifier and Type | Method and Description |
|---|---|
SimpleCatalog.SimpleSchema |
addTable(SimpleCatalog.SimpleTable table)
Adds a table to this schema.
|
SimpleCatalog.SimpleTable |
createTable(String tableName)
Creates and adds a new table to this schema with type "TABLE".
|
SimpleCatalog.SimpleTable |
createTable(String tableName,
String tableType)
Creates and adds a new table to this schema.
|
Catalog |
getCatalog()
Returns the catalog that this schema belongs to.
|
String |
getName()
Returns the name of the schema.
|
Table |
getTable(String tableName)
Returns a table by name, or null if not found.
|
List<String> |
getTableNames()
Returns all table names in this schema.
|
List<Table> |
getTables()
Returns all tables in this schema.
|
public SimpleSchema(String name, SimpleCatalog catalog)
public String getName()
Schemapublic Catalog getCatalog()
SchemagetCatalog in interface Schemapublic List<Table> getTables()
Schemapublic Table getTable(String tableName)
Schemapublic List<String> getTableNames()
SchemagetTableNames in interface Schemapublic SimpleCatalog.SimpleSchema addTable(SimpleCatalog.SimpleTable table)
table - Table to addpublic SimpleCatalog.SimpleTable createTable(String tableName, String tableType)
tableName - Table nametableType - Table type (e.g., "TABLE", "VIEW")public SimpleCatalog.SimpleTable createTable(String tableName)
tableName - Table name