Package com.exasol.dbbuilder.dialects
Interface Schema
-
- All Superinterfaces:
AutoCloseable,DatabaseObject
- All Known Implementing Classes:
AbstractSchema,ExasolSchema,MySqlSchema,OracleSchema,PostgreSqlSchema
public interface Schema extends DatabaseObject
Database schema.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TablecreateTable(String name, String column1Name, String column1Type)Create a table with one column.TablecreateTable(String name, String column1Name, String column1Type, String column2Name, String column2Type)Create a table with two columns.TablecreateTable(String name, String column1Name, String column1Type, String column2Name, String column2Type, String column3Name, String column3Type)Create a table with three columns.TablecreateTable(String name, List<String> columnNames, List<String> columnTypes)Create a table with an arbitrary number of columns.Table.BuildercreateTableBuilder(String name)Create a builder for a table.default DatabaseObjectgetParent()Get the parent object.List<Table>getTables()Get the tables inside this schema.default StringgetType()Get the type of the database object.default booleanhasParent()Check if this object has a parent object that sets the scope within the database-
Methods inherited from interface com.exasol.dbbuilder.dialects.DatabaseObject
close, drop, getFullyQualifiedName, getName, isOwned
-
-
-
-
Method Detail
-
getTables
List<Table> getTables()
Get the tables inside this schema.- Returns:
- list of tables in this schema
-
createTable
Table createTable(String name, List<String> columnNames, List<String> columnTypes)
Create a table with an arbitrary number of columns.- Parameters:
name- name of the tablecolumnNames- list of column namescolumnTypes- list of column types- Returns:
- table
-
createTable
Table createTable(String name, String column1Name, String column1Type)
Create a table with one column.- Parameters:
name- name of the tablecolumn1Name- name of the first columncolumn1Type- type of the first column- Returns:
- table
-
createTable
Table createTable(String name, String column1Name, String column1Type, String column2Name, String column2Type)
Create a table with two columns.- Parameters:
name- name of the tablecolumn1Name- name of the first columncolumn1Type- type of the first columncolumn2Name- name of the second columncolumn2Type- type of the second column- Returns:
- table
-
createTable
Table createTable(String name, String column1Name, String column1Type, String column2Name, String column2Type, String column3Name, String column3Type)
Create a table with three columns.- Parameters:
name- name of the tablecolumn1Name- name of the first columncolumn1Type- type of the first columncolumn2Name- name of the second columncolumn2Type- type of the second columncolumn3Name- name of the third columncolumn3Type- type of the third column- Returns:
- table
-
createTableBuilder
Table.Builder createTableBuilder(String name)
Create a builder for a table.In cases where you need a more complex table that can be created by the convenience methods
createTable, this method provides a builder.- Parameters:
name- table name- Returns:
- builder for the table
-
getType
default String getType()
Description copied from interface:DatabaseObjectGet the type of the database object.- Specified by:
getTypein interfaceDatabaseObject- Returns:
- type of the database object
-
hasParent
default boolean hasParent()
Description copied from interface:DatabaseObjectCheck if this object has a parent object that sets the scope within the database- Specified by:
hasParentin interfaceDatabaseObject- Returns:
trueif the object has a parent
-
getParent
default DatabaseObject getParent()
Description copied from interface:DatabaseObjectGet the parent object.- Specified by:
getParentin interfaceDatabaseObject- Returns:
- parent object
-
-