com.google.code.flyway.core.hsql
Class HsqlDbSupport

java.lang.Object
  extended by com.google.code.flyway.core.hsql.HsqlDbSupport
All Implemented Interfaces:
DbSupport

public class HsqlDbSupport
extends java.lang.Object
implements DbSupport

HsqlDb-specific support


Constructor Summary
HsqlDbSupport()
           
 
Method Summary
 java.lang.String[] createSchemaMetaDataTableSql(java.lang.String tableName)
          Generates the sql statements for creating the schema meta-data table.
 SqlScript createSqlScript(org.springframework.core.io.Resource resource, java.util.Map<java.lang.String,java.lang.String> placeholders)
          Creates a new sql script from this resource with these placeholders to replace.
 java.lang.String getCurrentSchema(org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbcTemplate)
          Retrieves the current schema.
 boolean metaDataTableExists(org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbcTemplate, java.lang.String schemaMetaDataTable)
          Checks whether Flyway's metadata table is already present in the database.
 boolean supportsDatabase(java.lang.String databaseProductName)
          Checks whether this DbSupport class supports the database with this product name.
 boolean supportsDdlTransactions()
          Checks whether ddl transactions are supported for this database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HsqlDbSupport

public HsqlDbSupport()
Method Detail

createSchemaMetaDataTableSql

public java.lang.String[] createSchemaMetaDataTableSql(java.lang.String tableName)
Description copied from interface: DbSupport
Generates the sql statements for creating the schema meta-data table.

Specified by:
createSchemaMetaDataTableSql in interface DbSupport
Parameters:
tableName - The name to give to this table.
Returns:
The sql statements.

getCurrentSchema

public java.lang.String getCurrentSchema(org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbcTemplate)
Description copied from interface: DbSupport
Retrieves the current schema.

Specified by:
getCurrentSchema in interface DbSupport
Parameters:
jdbcTemplate - The jdbc template used for querying the database.
Returns:
The current schema for this connection.

supportsDatabase

public boolean supportsDatabase(java.lang.String databaseProductName)
Description copied from interface: DbSupport
Checks whether this DbSupport class supports the database with this product name.

Specified by:
supportsDatabase in interface DbSupport
Parameters:
databaseProductName - The name of the database.
Returns:
true if the database is supported, false if not.

metaDataTableExists

public boolean metaDataTableExists(org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbcTemplate,
                                   java.lang.String schemaMetaDataTable)
Description copied from interface: DbSupport
Checks whether Flyway's metadata table is already present in the database.

Specified by:
metaDataTableExists in interface DbSupport
Parameters:
jdbcTemplate - The jdbc template used for querying the database.
schemaMetaDataTable - The table to look for.
Returns:
true if the table exists, false if it doesn't.

supportsDdlTransactions

public boolean supportsDdlTransactions()
Description copied from interface: DbSupport
Checks whether ddl transactions are supported for this database.

Specified by:
supportsDdlTransactions in interface DbSupport
Returns:
true if ddl transactions are supported, false if not.

createSqlScript

public SqlScript createSqlScript(org.springframework.core.io.Resource resource,
                                 java.util.Map<java.lang.String,java.lang.String> placeholders)
Description copied from interface: DbSupport
Creates a new sql script from this resource with these placeholders to replace.

Specified by:
createSqlScript in interface DbSupport
Parameters:
resource - The resource containing the sql script.
placeholders - A map of to replace in sql statements.
Returns:
A new sql script, containing the statements from this resource, with all placeholders replaced.


Copyright © 2010. All Rights Reserved.