| java.lang.Object workbench.db.DbMetadata
DbMetadata | public class DbMetadata (Code) | | Retrieve meta data information from the database.
This class returns more information than the generic JDBC DatabaseMetadata.
author: support@sql-workbench.net |
Method Summary | |
public String | adjustObjectnameCase(String name) Adjusts the case of the given object to the
case in which the server stores objects
This is needed e.g. | public String | adjustSchemaNameCase(String schema) Adjusts the case of the given schema name to the
case in which the server stores schema names.
This is needed e.g. | public String | buildIndexSource(TableIdentifier aTable, String indexName, boolean unique, String[] columnList) Build the SQL statement to create an Index on the given table. | public void | close() Release any resources for this object. | public void | disableOutput() | public void | enableOutput() | public void | enableOutput(long aLimit) Enable Oracle's DBMS_OUTPUT package. | public String | filterDDL(String sql) If a DDLFilter is registered for the current DBMS, this
method will replace all "problematic" characters in the
SQL string, and will return a String that the DBMS will
understand. | public TableIdentifier | findTable(TableIdentifier tbl) | public int | fixColumnType(int type) | public DataStore | getCatalogInformation() Returns a list of all catalogs in the database. | public String | getCatalogTerm() | public Map<String, String> | getColumnConstraints(TableIdentifier table) Return constraints defined for each column in the given table.
Parameters: table - The table to check A Map with columns and their constraints. | public String | getCurrentCatalog() Return the current catalog for this connection. | public String | getCurrentSchema() Returns the current schema. | public Set<String> | getDbDataTypes() | public Set<String> | getDbFunctions() | public String | getDbId() | public DbSettings | getDbSettings() | public DataStore | getExportedKeys(TableIdentifier tbl) | public String | getExtendedErrorInfo(String schema, String objectName, String objectType) Returns the errors available for the given object and type. | public CharSequence | getExtendedViewSource(TableIdentifier tbl, boolean includeDrop) | public CharSequence | getExtendedViewSource(TableIdentifier view, DataStore viewTableDefinition, boolean includeDrop) Returns a complete SQL statement to (re)create the given view. | public StringBuilder | getFkSource(TableIdentifier table) | public StringBuilder | getFkSource(TableIdentifier table, DataStore aFkDef, String tableNameToUse, boolean forInlineUse) Return a SQL script to re-create the Foreign key definition for the given table. | public DataStore | getForeignKeys(TableIdentifier table, boolean includeNumericRuleValue) | public DataStore | getImportedKeys(TableIdentifier tbl) | public DatabaseMetaData | getJdbcMetadata() | protected String | getMViewSource(TableIdentifier table, List<ColumnIdentifier> columns, DataStore aIndexDef, boolean includeDrop) | public String | getMViewTypeName() | public String | getObjectType(TableIdentifier table) Returns the type of the passed TableIdentifier. | public String | getOutputMessages() Return any server side messages. | public CharSequence | getPkSource(TableIdentifier table, List pkCols, String pkName) Builds an ALTER TABLE to add a primary key definition for the given tablename. | public DataStore | getProcedureColumns(String aCatalog, String aSchema, String aProcname) Returns the columns (==parameters) defined for the given procedure. | public List<ProcedureDefinition> | getProcedureList(String aCatalog, String aSchema) Return a List of
workbench.db.ProcedureDefinition objects
for Oracle packages only one ProcedureDefinition per package is returned (although
the DbExplorer will list each function of the packages). | public CharSequence | getProcedureSource(String aCatalog, String aSchema, String aProcname, int type) | public DataStore | getProcedures(String aCatalog, String aSchema) Return a list of stored procedures that are available
in the database. | public DataStore | getProceduresAndTriggers(String aCatalog, String aSchema) Return a list of stored procedures that are available
in the database. | public String | getProductName() | public DataStore | getReferencedBy(TableIdentifier table) | public String | getSchemaTerm() | public String | getSchemaToUse() Returns the schema that should be used for the current user
This essential call
DbMetadata.getCurrentSchema() . | public List<String> | getSchemas() | public List<TableIdentifier> | getSelectableObjectsList(String schema) | public SequenceReader | getSequenceReader() | public CharSequence | getSequenceSource(String fullName) | public CharSequence | getSequenceSource(String aCatalog, String aSchema, String aSequence) | public Connection | getSqlConnection() | public Collection<String> | getSqlKeywords() | public String | getSynonymSource(TableIdentifier synonym) Return the SQL statement to recreate the given synonym. | public TableIdentifier | getSynonymTable(TableIdentifier synonym) Return the underlying table of a synonym. | protected TableIdentifier | getSynonymTable(String schema, String synonym) Return the underlying table of a synonym. | public StringBuilder | getTableColumnCommentsSql(TableIdentifier table, List<ColumnIdentifier> columns) Return the SQL that is needed to re-create the comment on the given columns. | public List<ColumnIdentifier> | getTableColumns(TableIdentifier table) Return the column list for the given table. | public String | getTableComment(TableIdentifier tbl) | public String | getTableCommentSql(TableIdentifier table) Return the SQL that is needed to re-create the comment on the given table. | public String | getTableConstraints(TableIdentifier tbl, String indent) Return the SQL source for check constraints defined for the table. | public DataStore | getTableDefinition(TableIdentifier id) | protected DataStore | getTableDefinition(String aCatalog, String aSchema, String aTable, String aType) Return a DataStore containing the definition of the given table.
Parameters: aCatalog - The catalog in which the table is defined. | public StringBuilder | getTableGrantSource(TableIdentifier table) Creates an SQL Statement which can be used to re-create the GRANTs on the
given table. | public Collection<TableGrant> | getTableGrants(TableIdentifier table) Return the GRANTs for the given table
Some JDBC drivers return all GRANT privileges separately even if the original
GRANT was a GRANT ALL ON object TO user. | public DataStore | getTableIndexInformation(TableIdentifier table) Return the index information for a table as a DataStore. | public Collection<IndexDefinition> | getTableIndexList(TableIdentifier table) | public List<TableIdentifier> | getTableList(String schema, String[] types) | public List<TableIdentifier> | getTableList(String table, String schema) | public List<TableIdentifier> | getTableList(String table, String schema, String[] types) | public List<TableIdentifier> | getTableList(String table, String schema, String[] types, boolean returnAllSchemas) | public String | getTableSource(TableIdentifier table, boolean includeDrop, boolean includeFk) Return the SQL statement to re-create the given table. | public String | getTableSource(TableIdentifier table, List<ColumnIdentifier> columns, String tableNameToUse) | public String | getTableSource(TableIdentifier table, DataStore columns, DataStore aIndexDef, DataStore aFkDef, boolean includeDrop, String tableNameToUse) | public String | getTableSource(TableIdentifier table, List<ColumnIdentifier> columns, DataStore aIndexDef, DataStore aFkDef, boolean includeDrop, String tableNameToUse, boolean includeFk) | public DataStore | getTableTriggers(TableIdentifier table) Return the list of defined triggers for the given table. | public String | getTableType(TableIdentifier table) | public String | getTableTypeName() | public Collection<String> | getTableTypes() | public DataStore | getTables() | public DataStore | getTables(String aCatalog, String aSchema, String[] types) | public DataStore | getTables(String aCatalog, String aSchema, String tables, String[] types) | public String | getTriggerSource(String aCatalog, String aSchema, String aTriggername) Retrieve the SQL Source of the given trigger.
Parameters: aCatalog - The catalog in which the trigger is defined. | public DataStore | getTriggers(String catalog, String schema) Return a list of triggers available in the given schema. | protected DataStore | getTriggers(String catalog, String schema, String tableName) | public CharSequence | getViewSource(TableIdentifier viewId) Return the source of a view definition as it is stored in the database. | public String | getViewTypeName() | public WbConnection | getWbConnection() | public boolean | ignoreCatalog(String catalog) | public boolean | ignoreSchema(String schema) | public boolean | isApacheDerby() | public boolean | isCaseSensitive() | public boolean | isDefaultCase(String name) | public boolean | isFirebird() | public boolean | isHsql() | public boolean | isKeyword(String name) | public boolean | isMySql() | public boolean | isOracle() | public boolean | isPostgres() | public boolean | isSelectIntoNewTable(String sql) Checks if the given SQL string is actually some kind of table
creation "disguised" as a SELECT. | public boolean | isSqlServer() | public boolean | isTableType(String type) | public boolean | needCatalogInDML(TableIdentifier table) | public boolean | needSchemaInDML(TableIdentifier table) Check if the given
TableIdentifier requires
the usage of the schema for a DML (select, insert, update, delete)
statement. | public boolean | objectExists(TableIdentifier aTable, String type) | public boolean | objectExists(TableIdentifier aTable, String[] types) | public boolean | objectTypeCanContainData(String type) Check if the given DB object type can contain data. | public boolean | procedureExists(ProcedureDefinition def) | public String | quoteObjectname(String aName) | public String | quoteObjectname(String aName, boolean quoteAlways) Encloses the given object name in double quotes if necessary.
Quoting of names is necessary if the name is a reserved word in the
database. | public void | readProcedureSource(ProcedureDefinition def) | public TableIdentifier | resolveSynonym(TableIdentifier tbl) If the passed TableIdentifier is a Synonym and the current
DBMS supports synonyms, a TableIdentifier for the "real"
table is returned. | public boolean | setCurrentCatalog(String newCatalog) Changes the current catalog using Connection.setCatalog()
and notifies the connection object about the change. | public boolean | storesLowerCaseIdentifiers() Returns true if the server stores identifiers in lower case.
Usually this is delegated to the JDBC driver, but as some drivers
(e.g. | public boolean | storesLowerCaseSchemas() | public boolean | storesMixedCaseIdentifiers() Returns true if the server stores identifiers in mixed case.
Usually this is delegated to the JDBC driver, but as some drivers
(e.g. | public boolean | storesUpperCaseIdentifiers() Returns true if the server stores identifiers in upper case.
Usually this is delegated to the JDBC driver, but as some drivers
(e.g. | public boolean | storesUpperCaseSchemas() | public boolean | supportsBatchUpdates() Wrapper for DatabaseMetaData.supportsBatchUpdates() that throws
no exception. | public boolean | supportsCatalogs() | protected boolean | supportsMixedCaseIdentifiers() | protected boolean | supportsMixedCaseQuotedIdentifiers() | public boolean | supportsSelectIntoNewTable() Returns true if the current DBMS supports a SELECT syntax
which creates a new table (e.g. | public boolean | supportsSynonyms() Checks if the current DBMS supports synonyms. | public boolean | tableExists(TableIdentifier aTable) |
COLUMN_IDX_FK_DEF_COLUMN_NAME | final public static int COLUMN_IDX_FK_DEF_COLUMN_NAME(Code) | | |
COLUMN_IDX_FK_DEF_DEFERRABLE | final public static int COLUMN_IDX_FK_DEF_DEFERRABLE(Code) | | |
COLUMN_IDX_FK_DEF_DEFERRABLE_RULE_VALUE | final public static int COLUMN_IDX_FK_DEF_DEFERRABLE_RULE_VALUE(Code) | | |
COLUMN_IDX_FK_DEF_DELETE_RULE | final public static int COLUMN_IDX_FK_DEF_DELETE_RULE(Code) | | |
COLUMN_IDX_FK_DEF_DELETE_RULE_VALUE | final public static int COLUMN_IDX_FK_DEF_DELETE_RULE_VALUE(Code) | | |
COLUMN_IDX_FK_DEF_FK_NAME | final public static int COLUMN_IDX_FK_DEF_FK_NAME(Code) | | |
COLUMN_IDX_FK_DEF_REFERENCE_COLUMN_NAME | final public static int COLUMN_IDX_FK_DEF_REFERENCE_COLUMN_NAME(Code) | | |
COLUMN_IDX_FK_DEF_UPDATE_RULE | final public static int COLUMN_IDX_FK_DEF_UPDATE_RULE(Code) | | |
COLUMN_IDX_FK_DEF_UPDATE_RULE_VALUE | final public static int COLUMN_IDX_FK_DEF_UPDATE_RULE_VALUE(Code) | | |
COLUMN_IDX_TABLE_INDEXLIST_COL_DEF | final public static int COLUMN_IDX_TABLE_INDEXLIST_COL_DEF(Code) | | |
COLUMN_IDX_TABLE_INDEXLIST_INDEX_NAME | final public static int COLUMN_IDX_TABLE_INDEXLIST_INDEX_NAME(Code) | | |
COLUMN_IDX_TABLE_INDEXLIST_PK_FLAG | final public static int COLUMN_IDX_TABLE_INDEXLIST_PK_FLAG(Code) | | |
COLUMN_IDX_TABLE_INDEXLIST_TYPE | final public static int COLUMN_IDX_TABLE_INDEXLIST_TYPE(Code) | | |
COLUMN_IDX_TABLE_INDEXLIST_UNIQUE_FLAG | final public static int COLUMN_IDX_TABLE_INDEXLIST_UNIQUE_FLAG(Code) | | |
COLUMN_IDX_TABLE_LIST_CATALOG | final public static int COLUMN_IDX_TABLE_LIST_CATALOG(Code) | | The column index of the column in the DataStore returned by getTables()
the stores the table's catalog
|
COLUMN_IDX_TABLE_LIST_NAME | final public static int COLUMN_IDX_TABLE_LIST_NAME(Code) | | The column index of the column in the DataStore returned by getTables()
the stores the table's name
|
COLUMN_IDX_TABLE_LIST_REMARKS | final public static int COLUMN_IDX_TABLE_LIST_REMARKS(Code) | | The column index of the column in the DataStore returned by getTables()
the stores the table's comment
|
COLUMN_IDX_TABLE_LIST_SCHEMA | final public static int COLUMN_IDX_TABLE_LIST_SCHEMA(Code) | | The column index of the column in the DataStore returned by getTables()
the stores the table's schema
|
COLUMN_IDX_TABLE_LIST_TYPE | final public static int COLUMN_IDX_TABLE_LIST_TYPE(Code) | | The column index of the column in the DataStore returned by getTables()
that stores the table's type. The available types can be retrieved
using
DbMetadata.getTableTypes() |
COLUMN_IDX_TABLE_TRIGGERLIST_TRG_EVENT | final public static int COLUMN_IDX_TABLE_TRIGGERLIST_TRG_EVENT(Code) | | The column index in the DataStore returned by getTableTriggers which identifies
the event (before, after) of the trigger.
|
COLUMN_IDX_TABLE_TRIGGERLIST_TRG_NAME | final public static int COLUMN_IDX_TABLE_TRIGGERLIST_TRG_NAME(Code) | | The column index in the DataStore returned by getTableTriggers which identifies
the name of the trigger.
|
COLUMN_IDX_TABLE_TRIGGERLIST_TRG_TYPE | final public static int COLUMN_IDX_TABLE_TRIGGERLIST_TRG_TYPE(Code) | | The column index in the DataStore returned by getTableTriggers which identifies
the type (INSERT, UPDATE etc) of the trigger.
|
TABLE_DEFINITION_COLS | final public static String[] TABLE_DEFINITION_COLS(Code) | | |
adjustObjectnameCase | public String adjustObjectnameCase(String name)(Code) | | Adjusts the case of the given object to the
case in which the server stores objects
This is needed e.g. when the user types a
table name, and that value is used to retrieve
the table definition. Usually the getColumns()
method is case sensitiv.
Parameters: name - the object name to adjust the adjusted object name |
adjustSchemaNameCase | public String adjustSchemaNameCase(String schema)(Code) | | Adjusts the case of the given schema name to the
case in which the server stores schema names.
This is needed e.g. when the user types a
table name, and that value is used to retrieve
the table definition.
Parameters: schema - the schema name to adjust the adjusted schema name |
buildIndexSource | public String buildIndexSource(TableIdentifier aTable, String indexName, boolean unique, String[] columnList)(Code) | | Build the SQL statement to create an Index on the given table.
Parameters: aTable - - The table name for which the index should be constructed Parameters: indexName - - The name of the Index Parameters: unique - - Should the index be unique Parameters: columnList - - The columns that should build the index |
close | public void close()(Code) | | Release any resources for this object. After a call
to close(), this object should not be used any longer
|
filterDDL | public String filterDDL(String sql)(Code) | | If a DDLFilter is registered for the current DBMS, this
method will replace all "problematic" characters in the
SQL string, and will return a String that the DBMS will
understand.
Currently this is only implemented for PostgreSQL to
mimic pgsql's $$ quoting for stored procedures
See Also: workbench.db.postgres.PostgresDDLFilter |
fixColumnType | public int fixColumnType(int type)(Code) | | |
getCatalogInformation | public DataStore getCatalogInformation()(Code) | | Returns a list of all catalogs in the database.
Some DBMS's do not support catalogs, in this case the method
will return an empty Datastore.
|
getCurrentCatalog | public String getCurrentCatalog()(Code) | | Return the current catalog for this connection. If no catalog is defined
or the DBMS does not support catalogs, an empty string is returned.
This method works around a bug in Microsoft's JDBC driver which does
not return the correct database (=catalog) after the database has
been changed with the USE command from within the Workbench.
If no query has been configured for the current DBMS, DatabaseMetaData.getCatalog()
is used, otherwise the query that is configured with the property
workbench.db.[dbid].currentcatalog.query
See Also: DbSettings.getQueryForCurrentCatalog The name of the current catalog or an empty String if there is no current catalog |
getCurrentSchema | public String getCurrentSchema()(Code) | | Returns the current schema.
|
getFkSource | public StringBuilder getFkSource(TableIdentifier table, DataStore aFkDef, String tableNameToUse, boolean forInlineUse)(Code) | | Return a SQL script to re-create the Foreign key definition for the given table.
Parameters: aTable - the tablename for which the foreign keys should be created Parameters: aFkDef - a DataStore with the FK definition as returned by #getForeignKeys() a SQL statement to add the foreign key definitions to the given table |
getObjectType | public String getObjectType(TableIdentifier table)(Code) | | Returns the type of the passed TableIdentifier. This could
be VIEW, TABLE, SYNONYM, ...
If the JDBC driver does not return the object through the getTables()
method, null is returned, otherwise the value reported in TABLE_TYPE
If there is more than object with the same name but different types
(is there a DB that supports that???) than the first object found
will be returned.
See Also: DbMetadata.getTables(String,String,String,String[]) |
getOutputMessages | public String getOutputMessages()(Code) | | Return any server side messages. Currently this is only implemented
for Oracle (and is returning messages that were "printed" using
the DBMS_OUTPUT package
|
getPkSource | public CharSequence getPkSource(TableIdentifier table, List pkCols, String pkName)(Code) | | Builds an ALTER TABLE to add a primary key definition for the given tablename.
Parameters: table - Parameters: pkCols - Parameters: pkName - |
getProductName | public String getProductName()(Code) | | Return the name of the DBMS as reported by the JDBC driver
|
getSchemaToUse | public String getSchemaToUse()(Code) | | Returns the schema that should be used for the current user
This essential call
DbMetadata.getCurrentSchema() . The method
then checks if the schema should be ignored for the current
dbms by calling
DbMetadata.ignoreSchema(String) . If the
Schema should not be ignored, the it's returned, otherwise
the method will return null
|
getSchemas | public List<String> getSchemas()(Code) | | Returns the list of schemas as returned by DatabaseMetadata.getSchemas()
List |
getSynonymSource | public String getSynonymSource(TableIdentifier synonym)(Code) | | Return the SQL statement to recreate the given synonym.
the SQL to create the synonym. |
getSynonymTable | protected TableIdentifier getSynonymTable(String schema, String synonym)(Code) | | Return the underlying table of a synonym.
Parameters: schema - the schema of the synonym Parameters: synonym - the name of the synonym the table to which the synonym points or null if the passedname does not reference a synonym or if the DBMS does not support synonyms See Also: DbMetadata.getSynonymTable(String,String) |
getTableColumnCommentsSql | public StringBuilder getTableColumnCommentsSql(TableIdentifier table, List<ColumnIdentifier> columns)(Code) | | Return the SQL that is needed to re-create the comment on the given columns.
The syntax to be used, can be configured in the ColumnCommentStatements.xml file.
|
getTableCommentSql | public String getTableCommentSql(TableIdentifier table)(Code) | | Return the SQL that is needed to re-create the comment on the given table.
The syntax to be used, can be configured in the TableCommentStatements.xml file.
|
getTableConstraints | public String getTableConstraints(TableIdentifier tbl, String indent)(Code) | | Return the SQL source for check constraints defined for the table. This is
delegated to a
ConstraintReader A String with the table constraints. If no constrains exist, a null String is returned Parameters: tbl - The table to check Parameters: indent - A String defining the indention for the source code |
getTableDefinition | protected DataStore getTableDefinition(String aCatalog, String aSchema, String aTable, String aType) throws SQLException(Code) | | Return a DataStore containing the definition of the given table.
Parameters: aCatalog - The catalog in which the table is defined. This should be null if the DBMS does not support catalogs Parameters: aSchema - The schema in which the table is defined. This should be null if the DBMS does not support schemas Parameters: aTable - The name of the table Parameters: aType - The type of the table throws: SQLException - A DataStore with the table definition.The individual columns should be accessed using theCOLUMN_IDX_TABLE_DEFINITION_xxx constants. |
getTableGrantSource | public StringBuilder getTableGrantSource(TableIdentifier table)(Code) | | Creates an SQL Statement which can be used to re-create the GRANTs on the
given table.
SQL script to GRANT access to the table. |
getTableGrants | public Collection<TableGrant> getTableGrants(TableIdentifier table)(Code) | | Return the GRANTs for the given table
Some JDBC drivers return all GRANT privileges separately even if the original
GRANT was a GRANT ALL ON object TO user.
a List with TableGrant objects. |
getTableSource | public String getTableSource(TableIdentifier table, boolean includeDrop, boolean includeFk) throws SQLException(Code) | | Return the SQL statement to re-create the given table. (in the dialect for the
current DBMS)
the SQL statement to create the given table. Parameters: table - the table for which the source should be retrievedcatalog The catalog in which the table is defined. This should be null if the DBMS does not support catalogs Parameters: includeDrop - If true, a DROP TABLE statement will be included in the generated SQL script. Parameters: includeFk - if true, the foreign key constraints will be added after the CREATE TABLE throws: SQLException - |
getTriggerSource | public String getTriggerSource(String aCatalog, String aSchema, String aTriggername) throws SQLException(Code) | | Retrieve the SQL Source of the given trigger.
Parameters: aCatalog - The catalog in which the trigger is defined. This should be null if the DBMS does not support catalogs Parameters: aSchema - The schema in which the trigger is defined. This should be null if the DBMS does not support schemas Parameters: aTriggername - throws: SQLException - the trigger source |
ignoreCatalog | public boolean ignoreCatalog(String catalog)(Code) | | |
ignoreSchema | public boolean ignoreSchema(String schema)(Code) | | |
isApacheDerby | public boolean isApacheDerby()(Code) | | |
isCaseSensitive | public boolean isCaseSensitive()(Code) | | |
isDefaultCase | public boolean isDefaultCase(String name)(Code) | | Returns true if the given object name needs quoting due
to mixed case writing or because the case of the name
does not match the case in which the database stores its objects
|
isFirebird | public boolean isFirebird()(Code) | | |
isHsql | public boolean isHsql()(Code) | | |
isMySql | public boolean isMySql()(Code) | | |
isOracle | public boolean isOracle()(Code) | | |
isPostgres | public boolean isPostgres()(Code) | | |
isSelectIntoNewTable | public boolean isSelectIntoNewTable(String sql)(Code) | | Checks if the given SQL string is actually some kind of table
creation "disguised" as a SELECT.
Whether a statement is identified as a SELECT into a new table
is defined through the regular expression that can be set for
the DBMS using the property:
workbench.sql.[dbid].selectinto.pattern
This method returns true if a Regex has been defined and matches the given SQL
|
isSqlServer | public boolean isSqlServer()(Code) | | |
needSchemaInDML | public boolean needSchemaInDML(TableIdentifier table)(Code) | | Check if the given
TableIdentifier requires
the usage of the schema for a DML (select, insert, update, delete)
statement. By default this is not required for an Oracle
connetion where the schema is the current user.
For all other DBMS, the usage can be disabled by setting
a property in the configuration file
|
objectTypeCanContainData | public boolean objectTypeCanContainData(String type)(Code) | | Check if the given DB object type can contain data. i.e. if
a SELECT FROM can be run against this type
|
quoteObjectname | public String quoteObjectname(String aName, boolean quoteAlways)(Code) | | Encloses the given object name in double quotes if necessary.
Quoting of names is necessary if the name is a reserved word in the
database. To check if the given name is a keyword, it is compared
to the words returned by getSQLKeywords().
If the given name is not a keyword,
workbench.util.SqlUtil.quoteObjectname(String) will be called to check if the name contains special characters which require
double quotes around the object name.
For Oracle and HSQL strings starting with a digit will
always be quoted.
|
resolveSynonym | public TableIdentifier resolveSynonym(TableIdentifier tbl)(Code) | | If the passed TableIdentifier is a Synonym and the current
DBMS supports synonyms, a TableIdentifier for the "real"
table is returned.
Otherwise the passed TableIdentifier is returned
|
setCurrentCatalog | public boolean setCurrentCatalog(String newCatalog) throws SQLException(Code) | | Changes the current catalog using Connection.setCatalog()
and notifies the connection object about the change.
Parameters: newCatalog - the name of the new catalog/database that should be selected See Also: WbConnection.catalogChanged(StringString) |
storesLowerCaseIdentifiers | public boolean storesLowerCaseIdentifiers()(Code) | | Returns true if the server stores identifiers in lower case.
Usually this is delegated to the JDBC driver, but as some drivers
(e.g. Frontbase) implement this incorrectly, this can be overriden
in workbench.settings with the property:
workbench.db.objectname.case.
|
storesLowerCaseSchemas | public boolean storesLowerCaseSchemas()(Code) | | |
storesMixedCaseIdentifiers | public boolean storesMixedCaseIdentifiers()(Code) | | Returns true if the server stores identifiers in mixed case.
Usually this is delegated to the JDBC driver, but as some drivers
(e.g. Frontbase) implement this incorrectly, this can be overriden
in workbench.settings with the property:
workbench.db.[dbid].objectname.case
|
storesUpperCaseIdentifiers | public boolean storesUpperCaseIdentifiers()(Code) | | Returns true if the server stores identifiers in upper case.
Usually this is delegated to the JDBC driver, but as some drivers
(e.g. Frontbase) implement this incorrectly, this can be overriden
in workbench.settings
|
storesUpperCaseSchemas | public boolean storesUpperCaseSchemas()(Code) | | |
supportsBatchUpdates | public boolean supportsBatchUpdates()(Code) | | Wrapper for DatabaseMetaData.supportsBatchUpdates() that throws
no exception. If any error occurs, false will be returned
|
supportsCatalogs | public boolean supportsCatalogs()(Code) | | |
supportsMixedCaseIdentifiers | protected boolean supportsMixedCaseIdentifiers()(Code) | | |
supportsMixedCaseQuotedIdentifiers | protected boolean supportsMixedCaseQuotedIdentifiers()(Code) | | |
supportsSelectIntoNewTable | public boolean supportsSelectIntoNewTable()(Code) | | Returns true if the current DBMS supports a SELECT syntax
which creates a new table (e.g. SELECT .. INTO new_table FROM old_table)
It simply checks if a regular expression has been defined to
detect this kind of statements
See Also: DbMetadata.isSelectIntoNewTable(String) |
supportsSynonyms | public boolean supportsSynonyms()(Code) | | Checks if the current DBMS supports synonyms.
true if the synonym support is available (basically if synonymReader != null) |
tableExists | public boolean tableExists(TableIdentifier aTable)(Code) | | Check if the given table exists in the database
|
|
|