| net.sourceforge.squirrel_sql.fw.dialects.HADBDialect
Method Summary | |
public boolean | canPasteTo(IDatabaseObjectInfo info) Returns a boolean indicating whether or not the specified database object
can be pasted into for this database dialect. | public String[] | getAddPrimaryKeySQL(String pkName, TableColumnInfo[] colInfos, ITableInfo ti) | public String[] | getColumnAddSQL(TableColumnInfo info) | public String | getColumnCommentAlterSQL(TableColumnInfo info) | public String | getColumnDefaultAlterSQL(TableColumnInfo info) Returns the SQL command to change the specified column's default value
Parameters: info - the column to modify and it's default value. | public String | getColumnDropSQL(String tableName, String columnName) Returns the SQL that forms the command to drop the specified colum in the
specified table. | public int | getColumnLength(int columnSize, int dataType) Some jdbc drivers are hopelessly broken with regard to reporting the
COLUMN_SIZE. | public String | getColumnNameAlterSQL(TableColumnInfo from, TableColumnInfo to) Returns the SQL that is used to change the column name. | public String | getColumnNullableAlterSQL(TableColumnInfo info) | public List<String> | getColumnTypeAlterSQL(TableColumnInfo from, TableColumnInfo to) Returns the SQL that is used to change the column type. | public List<String> | getCreateTableSQL(List<ITableInfo> tables, ISQLDatabaseMetaData md, CreateScriptPreferences prefs, boolean isJdbcOdbc) Returns the SQL command to create the specified table.
Parameters: tables - the tables to get create statements for Parameters: md - the metadata from the ISession Parameters: prefs - preferences about how the resultant SQL commands should be formed. Parameters: isJdbcOdbc - whether or not the connection is via JDBC-ODBC bridge. | public String | getDisplayName() The string which identifies this dialect in the dialect chooser. | public String | getDropForeignKeySQL(String fkName, String tableName) Returns the SQL command to drop the specified table's foreign key
constraint. | public String | getDropPrimaryKeySQL(String pkName, String tableName) Returns the SQL command to drop the specified table's primary key. | public String | getLengthFunction(int dataType) Returns the name of the function that measures the length of a character
string.
Parameters: dataType - the java.sql.Types data type. | public String | getMaxFunction() Returns the name of the aggregate function that determines the max value
of an expression. | public int | getMaxPrecision(int dataType) Returns the maximum precision allowed by the database for number type
fields that specify the length of the number to the left of the decimal
point in digits. | public int | getMaxScale(int dataType) Returns the maximum scale allowed by the database for number type
fields that specify the length of the number to the right of the decimal
point in digits. | public int | getPrecisionDigits(int columnSize, int dataType) Returns the number of digits of precision is represented by the specifed
columnSize for the specified dataType. | public List<String> | getTableDropSQL(ITableInfo iTableInfo, boolean cascadeConstraints, boolean isMaterializedView) Returns the SQL that forms the command to drop the specified table. | public boolean | supportsAlterColumnDefault() Returns a boolean value indicating whether or not this database dialect
supports changing a column's default value. | public boolean | supportsAlterColumnNull() Returns a boolean value indicating whether or not this database dialect
supports changing a column from null to not-null and vice versa. | public boolean | supportsAlterColumnType() Returns a boolean value indicating whether or not this dialect supports
modifying a columns type. | public boolean | supportsColumnComment() Returns a boolean value indicating whether or not this dialect supports
adding comments to columns. | public boolean | supportsDropColumn() Returns a boolean value indicating whether or not this database dialect
supports dropping columns from tables. | public boolean | supportsProduct(String databaseProductName, String databaseProductVersion) Returns boolean value indicating whether or not this dialect supports the
specified database product/version. | public boolean | supportsRenameColumn() Returns a boolean value indicating whether or not this database dialect
supports renaming columns. | public boolean | supportsSchemasInTableDefinition() |
HADBDialect | public HADBDialect()(Code) | | |
canPasteTo | public boolean canPasteTo(IDatabaseObjectInfo info)(Code) | | Returns a boolean indicating whether or not the specified database object
can be pasted into for this database dialect. Some databases support the
notion of schemas where tables live, and in those cases pasting to a
database object in the object tree is not really appropriate. However,
other databases don't support schemas (like Axion, Firebird)
Parameters: info - |
getColumnDefaultAlterSQL | public String getColumnDefaultAlterSQL(TableColumnInfo info)(Code) | | Returns the SQL command to change the specified column's default value
Parameters: info - the column to modify and it's default value. SQL to make the change |
getColumnDropSQL | public String getColumnDropSQL(String tableName, String columnName) throws UnsupportedOperationException(Code) | | Returns the SQL that forms the command to drop the specified colum in the
specified table.
Parameters: tableName - the name of the table that has the column Parameters: columnName - the name of the column to drop. |
getColumnLength | public int getColumnLength(int columnSize, int dataType)(Code) | | Some jdbc drivers are hopelessly broken with regard to reporting the
COLUMN_SIZE. For example, MaxDB has a "long byte" data type which can
store up to 2G of data, yet the driver reports that the column size is
"8" - real helpful. So for drivers that have this problem, return the
"proper" maximum column length for the specified dataType. If the driver
doesn't have this problem, just return the columnSize.
Parameters: columnSize - the size of the column as reported by the jdbc driver Parameters: dataType - the type of the column. the specified columnSize if the jdbc driver isn't broken; otherwise, the maximum column size for the specified dataType ifthe driver is broken. |
getColumnNameAlterSQL | public String getColumnNameAlterSQL(TableColumnInfo from, TableColumnInfo to)(Code) | | Returns the SQL that is used to change the column name.
alter table test rename column mycol mycol2
Parameters: from - the TableColumnInfo as it is Parameters: to - the TableColumnInfo as it wants to be the SQL to make the change |
getColumnNullableAlterSQL | public String getColumnNullableAlterSQL(TableColumnInfo info)(Code) | | Returns the SQL used to alter the nullability of the specified column
Parameters: info - the column to modify the SQL to execute |
getCreateTableSQL | public List<String> getCreateTableSQL(List<ITableInfo> tables, ISQLDatabaseMetaData md, CreateScriptPreferences prefs, boolean isJdbcOdbc) throws SQLException(Code) | | Returns the SQL command to create the specified table.
Parameters: tables - the tables to get create statements for Parameters: md - the metadata from the ISession Parameters: prefs - preferences about how the resultant SQL commands should be formed. Parameters: isJdbcOdbc - whether or not the connection is via JDBC-ODBC bridge. the SQL that is used to create the specified table |
getDisplayName | public String getDisplayName()(Code) | | The string which identifies this dialect in the dialect chooser.
a descriptive name that tells the user what database this dialectis design to work with. |
getDropForeignKeySQL | public String getDropForeignKeySQL(String fkName, String tableName)(Code) | | Returns the SQL command to drop the specified table's foreign key
constraint.
Parameters: fkName - the name of the foreign key that should be dropped Parameters: tableName - the name of the table whose foreign key should be dropped |
getDropPrimaryKeySQL | public String getDropPrimaryKeySQL(String pkName, String tableName)(Code) | | Returns the SQL command to drop the specified table's primary key.
Parameters: pkName - the name of the primary key that should be dropped Parameters: tableName - the name of the table whose primary key should be dropped |
getLengthFunction | public String getLengthFunction(int dataType)(Code) | | Returns the name of the function that measures the length of a character
string.
Parameters: dataType - the java.sql.Types data type. Some databases have different length functions for different data types. the name of the function to be applied to a column to determinethe length of that column in a particular record. |
getMaxFunction | public String getMaxFunction()(Code) | | Returns the name of the aggregate function that determines the max value
of an expression.
the name of the function to be applied to a set to determine the element with the highest numeric value. |
getMaxPrecision | public int getMaxPrecision(int dataType)(Code) | | Returns the maximum precision allowed by the database for number type
fields that specify the length of the number to the left of the decimal
point in digits. If the HibernateDialect implementation doesn't ever
use $p in any call to registerColumnType(), then this maximum precsision
will not be used.
Parameters: dataType - the java.sql.Types data type. the maximum number that can be used in a column declaration for precision for the specified type. |
getMaxScale | public int getMaxScale(int dataType)(Code) | | Returns the maximum scale allowed by the database for number type
fields that specify the length of the number to the right of the decimal
point in digits. If the HibernateDialect implementation doesn't ever
use $s in any call to registerColumnType(), then this maximum scale
will not be used.
Parameters: dataType - the java.sql.Types data type. the maximum number that can be used in a column declaration for scale for the specified type. |
getPrecisionDigits | public int getPrecisionDigits(int columnSize, int dataType)(Code) | | Returns the number of digits of precision is represented by the specifed
columnSize for the specified dataType. Some DBs represent precision as
the total number of digits on the right or left of the decimal. That is
what we want. Others (like PostgreSQL) give the number of bytes of
storage a column can use - less than useful, since the SQL-92 says
"number of digits" and this is what most other DBs use.
Parameters: columnSize - the size of the column as reported by the driver. Parameters: dataType - the java.sql.Types data type. a number indicating the total number of digits (includes bothsides of the decimal point) the column can represent. |
getTableDropSQL | public List<String> getTableDropSQL(ITableInfo iTableInfo, boolean cascadeConstraints, boolean isMaterializedView)(Code) | | Returns the SQL that forms the command to drop the specified table. If
cascade contraints is supported by the dialect and cascadeConstraints is
true, then a drop statement with cascade constraints clause will be
formed.
Parameters: iTableInfo - the table to drop Parameters: cascadeConstraints - whether or not to drop any FKs that may reference the specified table. the drop SQL command. |
supportsAlterColumnDefault | public boolean supportsAlterColumnDefault()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports changing a column's default value.
true if the database supports modifying column defaults; false otherwise |
supportsAlterColumnNull | public boolean supportsAlterColumnNull()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports changing a column from null to not-null and vice versa.
true if the database supports dropping columns; false otherwise. |
supportsAlterColumnType | public boolean supportsAlterColumnType()(Code) | | Returns a boolean value indicating whether or not this dialect supports
modifying a columns type.
true if supported; false otherwise |
supportsColumnComment | public boolean supportsColumnComment()(Code) | | Returns a boolean value indicating whether or not this dialect supports
adding comments to columns.
true if column comments are supported; false otherwise. |
supportsDropColumn | public boolean supportsDropColumn()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports dropping columns from tables.
true if the database supports dropping columns; false otherwise. |
supportsProduct | public boolean supportsProduct(String databaseProductName, String databaseProductVersion)(Code) | | Returns boolean value indicating whether or not this dialect supports the
specified database product/version.
Parameters: databaseProductName - the name of the database as reported by DatabaseMetaData.getDatabaseProductName() Parameters: databaseProductVersion - the version of the database as reported byDatabaseMetaData.getDatabaseProductVersion() true if this dialect can be used for the specified product nameand version; false otherwise. |
supportsRenameColumn | public boolean supportsRenameColumn()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports renaming columns.
true if the database supports changing the name of columns; false otherwise. |
supportsSchemasInTableDefinition | public boolean supportsSchemasInTableDefinition()(Code) | | |
|
|