public interface IDBSchemaUtilsDriver extends Driver.IDriver
| Modifier and Type | Field and Description |
|---|---|
static int |
HANDLE_DEFAULT |
static int |
HANDLE_FALLBACK |
static int |
HANDLE_NONE |
static String |
REQUIRED_DEFAULT_COLUMN |
APPLICABLE_DEFAULT, APPLICABLE_FALLBACK, APPLICABLE_NONE| Modifier and Type | Method and Description |
|---|---|
default String |
catalogSearchPattern(BranchNode<?,DBSchemaNodeType> schema,
Connection connection,
String catalog) |
static void |
cleanColumnForeignKeys(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
IDBSchemaUtilsDriver dbSchemaUtilsDriver) |
default boolean |
columnExists(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
Map<String,Object> columnProperties)
check existence of column by
columnSpec. |
static boolean |
confirmDropSchema(Connection connection,
String schemaName,
Map<String,Object> properties) |
default void |
createColumn(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
Map<String,Object> columnProperties)
create column
|
default void |
createSchema(Connection connection,
String schemaName,
Map<String,Object> properties)
create a new schema
|
default void |
createTable(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
Map<String,Object> tableProperties)
create a table object in database
|
default String |
determineColumnType(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
Map<String,Object> columnProperties)
determine type of column
|
default void |
dropColumn(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
String columnName,
boolean quoted)
drop column
|
default void |
dropDummyColumns(Connection connection,
BranchNode<?,DBSchemaNodeType> schema)
clean schema from columns created with table-objects by dbms can not create tables without columns
|
default void |
dropForeignKey(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
String keyName,
boolean quoted)
drop foreign key
|
default void |
dropIndex(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
String indexName,
boolean quoted)
drop index with indexName
|
default void |
dropSchema(Connection connection,
String schemaName,
Map<String,Object> properties)
drops a schema
|
default String |
getFunctionExpression(String function)
convert function name to function syntax
|
default boolean |
isValidColumnProperties(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
Map<String,Object> columnProperties)
check column properties (default-value, type, nullable)
|
default boolean |
isValidForeignKey(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
Map<String,Object> columnProperties)
check valid created foreign key
|
default boolean |
isValidIndex(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,IndexNodeType> index,
Map<String,Object> indexProperties)
check valid index setup
|
default String |
objectNameGuidelineFormat(BranchNode<?,DBSchemaNodeType> schema,
Connection connection,
String name,
String type)
convert object name (e.g.
|
default String |
objectSearchPattern(BranchNode<?,DBSchemaNodeType> schema,
Connection connection,
String name,
boolean quoted,
String type) |
default boolean |
primaryKeyExists(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
Map<String,Object> tableProperties)
check existence of tables primary key by
tableSpec. |
default char |
quotedChar() |
default boolean |
schemaExists(Connection connection,
String schemaName)
check the schema exists
|
default String |
schemaSearchPattern(BranchNode<?,DBSchemaNodeType> schema,
Connection connection,
String schemaName) |
default void |
setPrimaryKey(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
Map<String,Object> tableProperties)
create primary key
|
static void |
setPrimaryKeyWithIndex(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
Map<String,Object> tableProperties,
IDBSchemaUtilsDriver dbSchemaUtilsDriver) |
static void |
setPrimaryKeyWithoutIndex(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
Map<String,Object> tableProperties,
IDBSchemaUtilsDriver dbSchemaUtilsDriver) |
default void |
setValidColumnProperties(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
Map<String,Object> columnProperties)
set valid column properties (default-value, type, nullable)
|
default void |
setValidForeignKey(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,ColumnNodeType> column,
Map<String,Object> columnProperties)
create or update foreign key setting for
columnSpec |
default void |
setValidIndex(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
BranchNode<?,IndexNodeType> index,
Map<String,Object> indexProperties)
setup valid index by
indexSpec |
default boolean |
tableExists(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
Map<String,Object> tableProperties)
check existence of table by
tableSpec. |
default boolean |
tableRequiresColumn() |
default String |
tableSpaceAppendix(Connection connection,
BranchNode<?,DBSchemaNodeType> schema,
BranchNode<?,TableNodeType> table,
Map<String,Object> properties,
String tableSpace,
String type) |
driverIsApplicableForstatic final int HANDLE_NONE
static final int HANDLE_FALLBACK
static final int HANDLE_DEFAULT
static final String REQUIRED_DEFAULT_COLUMN
default void createSchema(Connection connection, String schemaName, Map<String,Object> properties) throws SQLException
connection - underlying connection to create schema nameschemaName - name of schema to createproperties - further driver-specific informationsSQLExceptiondefault boolean schemaExists(Connection connection, String schemaName) throws SQLException
connection - underlying connection to check the schemaschemaName - name of schema to checkSQLExceptiondefault void dropSchema(Connection connection, String schemaName, Map<String,Object> properties) throws SQLException
connection - underlying connection to drop the schemaschemaName - name of schema to dropproperties - informations to confirm dropSQLExceptionstatic boolean confirmDropSchema(Connection connection, String schemaName, Map<String,Object> properties) throws SQLException
SQLExceptiondefault boolean tableExists(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, Map<String,Object> tableProperties) throws SQLException
tableSpec.connection - underlying connection to check existence of tableschema - hole schema specificationtable - table specification to checktableProperties - properties to store working parameterSQLExceptiondefault void createTable(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, Map<String,Object> tableProperties) throws SQLException
connection - underlying connection to create tableschema - hole schema specificationtable - table specification to create tabletableProperties - properties to store working parameterSQLExceptiondefault boolean primaryKeyExists(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, Map<String,Object> tableProperties) throws SQLException
tableSpec.connection - underlying connection to check existence of primary keyschema - hole schema specificationtable - table specification to checktableProperties - properties to store working parameterSQLExceptiondefault void setPrimaryKey(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, Map<String,Object> tableProperties) throws SQLException
connection - underlying connection to create primary keyschema - hole schema specificationtable - table specification to create primary keytableProperties - properties to store working parameterSQLExceptionstatic void setPrimaryKeyWithIndex(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, Map<String,Object> tableProperties, IDBSchemaUtilsDriver dbSchemaUtilsDriver) throws SQLException
SQLExceptionstatic void setPrimaryKeyWithoutIndex(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, Map<String,Object> tableProperties, IDBSchemaUtilsDriver dbSchemaUtilsDriver) throws SQLException
SQLExceptiondefault boolean columnExists(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, Map<String,Object> columnProperties) throws SQLException
columnSpec.connection - underlying connection to check existence of columnschema - hole schema specificationtable - table specification of columns tablecolumn - column specification to checkcolumnProperties - properties to store working parameterSQLExceptiondefault String determineColumnType(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, Map<String,Object> columnProperties) throws SQLException
connection - underlying connection to check valid type of existing columnschema - hole schema specificationtable - table specification of columns tablecolumn - column specification to checkcolumnProperties - properties with working parameterSQLExceptiondefault void createColumn(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, Map<String,Object> columnProperties) throws SQLException
connection - connection underlying connection to create columnschema - hole schema specificationtable - table specification of columns tablecolumn - column specification to createcolumnProperties - properties to store working parameterSQLExceptiondefault void dropColumn(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, String columnName, boolean quoted) throws SQLException
connection - underlying connection to drop columnschema - hole schema specificationtable - table specification of columns tablecolumnName - name of column to dropquoted - use column name as quoted object nameSQLExceptiondefault boolean isValidColumnProperties(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, Map<String,Object> columnProperties) throws SQLException
connection - underlying connection to check columnschema - hole schema specificationtable - table specification of columns tablecolumn - column specification to checkcolumnProperties - properties to store working parameterSQLExceptiondefault void setValidColumnProperties(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, Map<String,Object> columnProperties) throws SQLException
connection - connection underlying connection to setup columnschema - hole schema specificationtable - table specification of columns tablecolumn - column specification for setupcolumnProperties - properties to store working parameterSQLExceptiondefault boolean isValidForeignKey(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, Map<String,Object> columnProperties) throws SQLException
connection - underlying connection to check foreign keyschema - hole schema specificationtable - table specification of columns tablecolumn - column specification to check foreign keycolumnProperties - properties to store working parameterSQLExceptiondefault void setValidForeignKey(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, Map<String,Object> columnProperties) throws SQLException
columnSpecconnection - underlying connection to set foreign keyschema - hole schema specificationtable - table specification of columns tablecolumn - column specification to set foreign keycolumnProperties - properties to store working parameterSQLExceptionstatic void cleanColumnForeignKeys(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,ColumnNodeType> column, IDBSchemaUtilsDriver dbSchemaUtilsDriver) throws SQLException
SQLExceptiondefault void dropForeignKey(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, String keyName, boolean quoted) throws SQLException
connection - underlying connection to drop foreign keyschema - hole schema specificationtable - table specification of columns tablekeyName - name of foreign key to dropquoted - use key name as quoted object nameSQLExceptiondefault boolean isValidIndex(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,IndexNodeType> index, Map<String,Object> indexProperties) throws SQLException
connection - underlying connection to check indexschema - hole schema specificationtable - table specification of indexindex - index specificationindexProperties - properties to store working parameterSQLExceptiondefault void setValidIndex(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, BranchNode<?,IndexNodeType> index, Map<String,Object> indexProperties) throws SQLException
indexSpecconnection - underlying connection to setup indexschema - hole schema specificationtable - table specification of indexindex - index specificationindexProperties - properties to store working parameterSQLExceptiondefault void dropIndex(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, String indexName, boolean quoted) throws SQLException
connection - underlying connection to drop indexschema - hole schema specificationtable - table specification of indexindexName - name of index to dropquoted - use index name as quoted object nameSQLExceptiondefault void dropDummyColumns(Connection connection, BranchNode<?,DBSchemaNodeType> schema) throws SQLException
connection - underlying connection to clean from dummy columnsschema - hole schema specificationSQLExceptiondefault String getFunctionExpression(String function)
function - name of functiondefault boolean tableRequiresColumn()
default String catalogSearchPattern(BranchNode<?,DBSchemaNodeType> schema, Connection connection, String catalog)
schema - hole schema specificationconnection - underlying connectioncatalog - catalog namedefault String schemaSearchPattern(BranchNode<?,DBSchemaNodeType> schema, Connection connection, String schemaName)
schema - hole schema specificationconnection - underlying connectionschemaName - schema namedefault String objectSearchPattern(BranchNode<?,DBSchemaNodeType> schema, Connection connection, String name, boolean quoted, String type)
schema - hole schema specificationconnection - underlying connectionname - object's namequoted - use name as quoted object nametype - object type (TABLE,COLUMN ...)default String objectNameGuidelineFormat(BranchNode<?,DBSchemaNodeType> schema, Connection connection, String name, String type)
schema - hole schema specificationconnection - underlying connectionname - object's nametype - object typedefault char quotedChar()
default String tableSpaceAppendix(Connection connection, BranchNode<?,DBSchemaNodeType> schema, BranchNode<?,TableNodeType> table, Map<String,Object> properties, String tableSpace, String type)
connection - schema - table - properties - tableSpace - type - Copyright © 2020. All rights reserved.