Top Fields Constructors Methods
liquibase.database.core

public Class HsqlDatabase

extends AbstractJdbcDatabase
Class Inheritance
Imports
liquibase.database.AbstractJdbcDatabase, .DatabaseConnection, .ObjectQuotingStrategy, liquibase.exception.DatabaseException, .DateParseException, liquibase.structure.DatabaseObject, liquibase.structure.core.Table, liquibase.util.ISODateFormat, java.math.BigInteger, java.text.DateFormat, .ParseException, .SimpleDateFormat, java.util.*

Field Summary

Modifier and TypeField and Description
private static final String
private static final List<E>
private Boolean
private static final String
private static final String
private static final Map<String, HashSet<String>>
Inherited from liquibase.database.AbstractJdbcDatabase:
caseSensitivecurrentDateTimeFunctiondateFunctionsdefaultAutoIncrementBydefaultAutoIncrementStartWithdefaultCatalogNamedefaultSchemaNamequotingStrategysequenceCurrentValueFunctionsequenceNextValueFunctionunmodifiableDataTypesunquotedObjectsAreUppercased

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public String
getAutoIncrementClause(BigInteger startWith, BigInteger incrementBy, String generationType, Boolean defaultOnNull)

Overrides liquibase.database.AbstractJdbcDatabase.getAutoIncrementClause.

Implements liquibase.database.Database.getAutoIncrementClause.

Returns database-specific auto-increment DDL clause.

public String
getConcatSql(String... values)

Overrides liquibase.database.AbstractJdbcDatabase.getConcatSql.

Implements liquibase.database.Database.getConcatSql.

Returns SQL to concat the passed values.

private String

Returns:

a String containing the CONCAT instruction with all elements, or only a value if there is only one element in the list
getConcatSql
(List<String>
a non null List of String
values
)

Recursive way of building CONCAT instruction

protected String
protected String
getConnectionSchemaName()

Overrides liquibase.database.AbstractJdbcDatabase.getConnectionSchemaName.

Overwrite this method to get the default schema name for the connection.

public String
getDateLiteral(String isoDate)

Overrides liquibase.database.AbstractJdbcDatabase.getDateLiteral.

Implements liquibase.database.Database.getDateLiteral.

Return a date literal with the same value as a string formatted using ISO 8601.

protected String
public String
getDefaultDriver(String url)

Implements liquibase.database.Database.getDefaultDriver.

If this database understands the given url, return the default driver class name.

public Integer
public int
getMaxFractionalDigitsForTimestamp()

Overrides liquibase.database.AbstractJdbcDatabase.getMaxFractionalDigitsForTimestamp.

Implements liquibase.database.Database.getMaxFractionalDigitsForTimestamp.

Most relational databases support 9 fractional digits, and subclasses must overwrite this method if they support less than that.

public int
public String
getShortName()

Implements liquibase.database.Database.getShortName.

Returns an all-lower-case short name of the product.

public boolean
public boolean
isCorrectDatabaseImplementation(DatabaseConnection conn)

Implements liquibase.database.Database.isCorrectDatabaseImplementation.

Is this AbstractDatabase subclass the correct one to use for the given connection.

public boolean
public boolean
public Date
public void
public boolean
public boolean
supportsCreateIfNotExists(Class<? extends DatabaseObject>
the DatabaseObject type to be checked.
type
)

Overrides default liquibase.database.Database.supportsCreateIfNotExists.

Does the database support the "if not exits" syntax?

public static boolean

Returns:

boolean True if the string represents a function supported by HSQL for default values
supportsDefaultValueComputed
(String
String of the column's data type
columnType
,
String
String to be checked for valid valueComputed in HSQL
defaultValue
)

Checks to see if the string is an acceptable computed value for HSQL "datetime" columns are the only columns for which HSQL supports computer values.

public boolean
supportsInitiallyDeferrableColumns()

Implements liquibase.database.Database.supportsInitiallyDeferrableColumns.

Returns whether this database support initially deferrable columns.

public boolean
public boolean
Inherited from liquibase.database.AbstractJdbcDatabase:
addReservedWordscanCreateChangeLogTableclosecommitcorrectObjectNamecorrectSchemacorrectSchemacreatesIndexesForForeignKeysdataTypeIsNotModifiabledisableForeignKeyChecksdoesTagExistdropDatabaseObjectsenableForeignKeyChecksequalsescapeColumnNameescapeColumnNameescapeColumnNameListescapeConstraintNameescapeDataTypeNameescapeIndexNameescapeObjectNameescapeSequenceNameescapeStringForDatabaseescapeTableNameescapeViewNameexecuteexecuteRollbackStatementsexecuteRollbackStatementsexecuteStatementsfilterRollbackVisitorsgenerateAutoIncrementBygenerateAutoIncrementStartWithgenerateDatabaseFunctionValuegeneratePrimaryKeyNamegetgetAutoCommitModegetAutoIncrementByClausegetAutoIncrementClausegetAutoIncrementClausegetAutoIncrementClosinggetAutoIncrementOpeninggetAutoIncrementStartWithClausegetConnectiongetConnectionSchemaNameCallStatementgetContainingObjectsgetCurrentDateTimeFunctiongetDatabaseChangeLogLockTableNamegetDatabaseChangeLogTableNamegetDatabaseMajorVersiongetDatabaseMinorVersiongetDatabaseProductNamegetDatabaseProductVersiongetDataTypeMaxParametersgetDateFunctionsgetDateLiteralgetDateLiteralgetDateTimeLiteralgetDefaultCatalogNamegetDefaultFractionalDigitsForTimestampgetDefaultScaleForNativeDataTypegetDefaultSchemagetDefaultSchemaNamegetFetchSizegetJdbcCatalogNamegetJdbcCatalogNamegetJdbcSchemaNamegetJdbcSchemaNamegetLineCommentgetLiquibaseCatalogNamegetLiquibaseSchemaNamegetLiquibaseTablespaceNamegetNamegetObjectQuotingStrategygetOutputDefaultCataloggetOutputDefaultSchemagetQuotingEndCharactergetQuotingEndReplacementgetQuotingStartCharactergetRanChangeSetgetRanChangeSetListgetRanDategetRawDatabaseChangeLogLockTableNamegetRawDatabaseChangeLogTableNamegetRunStatusgetSchemaAndCatalogCasegetSchemaFromJdbcInfogetSystemSchemagetSystemTablesgetSystemViewsgetTimeLiteralgetViewDefinitionhashCodeisAutoCommitisCatalogOrSchemaTypeisCurrentTimeFunctionisDateOnlyisDateTimeisDefaultCatalogisDefaultSchemaisFunctionisLiquibaseObjectisSafeToRunUpdateisSystemObjectisSystemViewisTimeOnlyisTimestampjdbcCallsCatalogsSchemasmarkChangeSetExecStatusmustQuoteObjectNamequoteObjectremoveRanStatusrequiresExplicitNullForColumnsrequiresPasswordrequiresUsernameresetInternalStaterollbacksaveRollbackStatementsaveStatementssetsetAutoCommitsetCanCacheLiquibaseTableInfosetCaseSensitivesetCurrentDateTimeFunctionsetDatabaseChangeLogLockTableNamesetDatabaseChangeLogTableNamesetDefaultCatalogNamesetDefaultSchemaNamesetLiquibaseCatalogNamesetLiquibaseSchemaNamesetLiquibaseTablespaceNamesetObjectQuotingStrategysetOutputDefaultCatalogsetOutputDefaultSchemastartsWithNumericsupportsAutoIncrementsupportsBatchUpdatessupportsCatalogInObjectNamesupportsDDLInTransactionsupportsDropTableCascadeConstraintssupportsForeignKeyDisablesupportsNotNullConstraintNamessupportsPrimaryKeyNamessupportsRestrictForeignKeyssupportsSchemastagtoStringunescapeDataTypeNameunescapeDataTypeStringvalidate

Field Detail

END_CONCATback to summary
private static final String END_CONCAT
keywordsback to summary
private static final List<E> keywords
oracleSyntaxback to summary
private Boolean oracleSyntax
SEP_CONCATback to summary
private static final String SEP_CONCAT
START_CONCATback to summary
private static final String START_CONCAT
SUPPORTED_DEFAULT_VALUE_COMPUTED_MAPback to summary
private static final Map<String, HashSet<String>> SUPPORTED_DEFAULT_VALUE_COMPUTED_MAP

Constructor Detail

HsqlDatabaseback to summary
public HsqlDatabase()

Method Detail

escapeObjectNameback to summary
public String escapeObjectName(String objectName, Class<? extends DatabaseObject> objectType)

Overrides liquibase.database.AbstractJdbcDatabase.escapeObjectName.

Implements liquibase.database.Database.escapeObjectName.

Annotations
@Override
getAutoIncrementClauseback to summary
public String getAutoIncrementClause(BigInteger startWith, BigInteger incrementBy, String generationType, Boolean defaultOnNull)

Overrides liquibase.database.AbstractJdbcDatabase.getAutoIncrementClause.

Implements liquibase.database.Database.getAutoIncrementClause.

Doc from liquibase.database.Database.getAutoIncrementClause.

Returns database-specific auto-increment DDL clause.

Annotations
@Override
getConcatSqlback to summary
public String getConcatSql(String... values)

Overrides liquibase.database.AbstractJdbcDatabase.getConcatSql.

Implements liquibase.database.Database.getConcatSql.

Doc from liquibase.database.Database.getConcatSql.

Returns SQL to concat the passed values.

Annotations
@Override
getConcatSqlback to summary
private String getConcatSql(List<String> values)

Recursive way of building CONCAT instruction

Parameters
values:List<String>

a non null List of String

Returns:String

a String containing the CONCAT instruction with all elements, or only a value if there is only one element in the list

getConnectionCatalogNameback to summary
protected String getConnectionCatalogName() throws DatabaseException

Overrides liquibase.database.AbstractJdbcDatabase.getConnectionCatalogName.

Annotations
@Override
getConnectionSchemaNameback to summary
protected String getConnectionSchemaName()

Overrides liquibase.database.AbstractJdbcDatabase.getConnectionSchemaName.

Doc from liquibase.database.AbstractJdbcDatabase.getConnectionSchemaName.

Overwrite this method to get the default schema name for the connection. If you only need to change the statement that obtains the current schema then override

Annotations
@Override
getDateLiteralback to summary
public String getDateLiteral(String isoDate)

Overrides liquibase.database.AbstractJdbcDatabase.getDateLiteral.

Implements liquibase.database.Database.getDateLiteral.

Doc from liquibase.database.AbstractJdbcDatabase.getDateLiteral.

Return a date literal with the same value as a string formatted using ISO 8601.

Note

many databases accept date literals in ISO8601 format with the 'T' replaced with a space. Only databases which do not accept these strings should need to override this method.

Implementation restriction: Currently, only the following subsets of ISO8601 are supported: yyyy-MM-dd hh:mm:ss yyyy-MM-ddThh:mm:ss

Annotations
@Override
getDefaultDatabaseProductNameback to summary
protected String getDefaultDatabaseProductName()

Implements abstract liquibase.database.AbstractJdbcDatabase.getDefaultDatabaseProductName.

Annotations
@Override
getDefaultDriverback to summary
public String getDefaultDriver(String url)

Implements liquibase.database.Database.getDefaultDriver.

Doc from liquibase.database.Database.getDefaultDriver.

If this database understands the given url, return the default driver class name. Otherwise return null.

Annotations
@Override
getDefaultPortback to summary
public Integer getDefaultPort()

Implements liquibase.database.Database.getDefaultPort.

Annotations
@Override
getMaxFractionalDigitsForTimestampback to summary
public int getMaxFractionalDigitsForTimestamp()

Overrides liquibase.database.AbstractJdbcDatabase.getMaxFractionalDigitsForTimestamp.

Implements liquibase.database.Database.getMaxFractionalDigitsForTimestamp.

Doc from liquibase.database.AbstractJdbcDatabase.getMaxFractionalDigitsForTimestamp.

Most relational databases support 9 fractional digits, and subclasses must overwrite this method if they support less than that.

Returns:int

the maximum number of supported fractional digits in TIMESTAMP columns

Annotations
@Override
getPriorityback to summary
public int getPriority()

Implements liquibase.servicelocator.PrioritizedService.getPriority.

Annotations
@Override
getShortNameback to summary
public String getShortName()

Implements liquibase.database.Database.getShortName.

Doc from liquibase.database.Database.getShortName.

Returns an all-lower-case short name of the product. Used for end-user selecting of database type such as the DBMS precondition.

Annotations
@Override
isCaseSensitiveback to summary
public boolean isCaseSensitive()

Overrides liquibase.database.AbstractJdbcDatabase.isCaseSensitive.

Implements liquibase.database.Database.isCaseSensitive.

Annotations
@Override
isCorrectDatabaseImplementationback to summary
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException

Implements liquibase.database.Database.isCorrectDatabaseImplementation.

Doc from liquibase.database.Database.isCorrectDatabaseImplementation.

Is this AbstractDatabase subclass the correct one to use for the given connection.

Annotations
@Override
isReservedWordback to summary
public boolean isReservedWord(String value)

Overrides liquibase.database.AbstractJdbcDatabase.isReservedWord.

Implements liquibase.database.Database.isReservedWord.

Annotations
@Override
isUsingOracleSyntaxback to summary
public boolean isUsingOracleSyntax()
parseDateback to summary
public Date parseDate(String dateAsString) throws DateParseException

Overrides liquibase.database.AbstractJdbcDatabase.parseDate.

Implements liquibase.database.Database.parseDate.

Annotations
@Override
setConnectionback to summary
public void setConnection(DatabaseConnection conn)

Overrides liquibase.database.AbstractJdbcDatabase.setConnection.

Implements liquibase.database.Database.setConnection.

Annotations
@Override
supportsCatalogsback to summary
public boolean supportsCatalogs()

Overrides liquibase.database.AbstractJdbcDatabase.supportsCatalogs.

Implements liquibase.database.Database.supportsCatalogs.

Annotations
@Override
supportsCreateIfNotExistsback to summary
public boolean supportsCreateIfNotExists(Class<? extends DatabaseObject> type)

Overrides default liquibase.database.Database.supportsCreateIfNotExists.

Doc from liquibase.database.Database.supportsCreateIfNotExists.

Does the database support the "if not exits" syntax?

Parameters
type:Class<? extends DatabaseObject>

the DatabaseObject type to be checked.

Returns:boolean

true if the "if not exists" syntax is supported, false otherwise.

Annotations
@Override
supportsDefaultValueComputedback to summary
public static boolean supportsDefaultValueComputed(String columnType, String defaultValue)

Checks to see if the string is an acceptable computed value for HSQL "datetime" columns are the only columns for which HSQL supports computer values.

Parameters
columnType:String

String of the column's data type

defaultValue:String

String to be checked for valid valueComputed in HSQL

Returns:boolean

boolean True if the string represents a function supported by HSQL for default values

supportsInitiallyDeferrableColumnsback to summary
public boolean supportsInitiallyDeferrableColumns()

Implements liquibase.database.Database.supportsInitiallyDeferrableColumns.

Doc from liquibase.database.Database.supportsInitiallyDeferrableColumns.

Returns whether this database support initially deferrable columns.

Annotations
@Override
supportsSequencesback to summary
public boolean supportsSequences()

Overrides liquibase.database.AbstractJdbcDatabase.supportsSequences.

Implements liquibase.database.Database.supportsSequences.

Doc from liquibase.database.AbstractJdbcDatabase.supportsSequences.

Does the database type support sequence.

Annotations
@Override
supportsTablespacesback to summary
public boolean supportsTablespaces()

Implements liquibase.database.Database.supportsTablespaces.

Annotations
@Override