org.apache.ddlutils.platform.hsqldb
Class HsqlDbBuilder

java.lang.Object
  extended byorg.apache.ddlutils.platform.SqlBuilder
      extended byorg.apache.ddlutils.platform.hsqldb.HsqlDbBuilder

public class HsqlDbBuilder
extends SqlBuilder

The SQL Builder for the HsqlDb database.

Version:
$Revision: 378736 $
Author:
James Strachan, Thomas Dudziak

Field Summary
 
Fields inherited from class org.apache.ddlutils.platform.SqlBuilder
_log, SIZE_PLACEHOLDER
 
Constructor Summary
HsqlDbBuilder(PlatformInfo info)
          Creates a new builder instance.
 
Method Summary
 void dropTable(Table table)
          Outputs the DDL to drop the table.
 String getSelectLastInsertId(Table table)
          Generates the SQL for querying the id that was created in the last insertion operation. This is obviously only useful for pk fields that are auto-incrementing. A database that does not support this, will return null.
 
Methods inherited from class org.apache.ddlutils.platform.SqlBuilder
addEscapedCharSequence, alterDatabase, alterDatabase, alterDatabase, alterTable, columnsDiffer, createExternalForeignKeys, createExternalForeignKeys, createTable, createTable, createTables, createTables, createTables, dropExternalForeignKeys, dropTables, escapeStringValue, getColumnName, getConstraintName, getDefaultValueHelper, getDeleteSql, getDelimitedIdentifier, getForeignKeyName, getIndent, getIndexName, getInsertSql, getNativeDefaultValue, getNativeType, getPlatformInfo, getSqlType, getTableName, getUpdateSql, getValueAsString, getValueLocale, getWriter, print, printComment, printEndOfStatement, printIdentifier, printIndent, println, println, printlnIdentifier, printStartOfEmbeddedStatement, setIndent, setValueLocale, setWriter, shortenName, shouldGeneratePrimaryKeys, writeColumn, writeColumnAlterStmt, writeColumnAutoIncrementStmt, writeColumnDefaultValue, writeColumnDropStmt, writeColumnNotNullableStmt, writeColumnNullableStmt, writeColumns, writeEmbeddedForeignKeysStmt, writeEmbeddedIndexCreateStmt, writeEmbeddedIndicesStmt, writeEmbeddedPrimaryKeysStmt, writeExternalForeignKeyCreateStmt, writeExternalForeignKeyDropStmt, writeExternalIndexCreateStmt, writeExternalIndexDropStmt, writeExternalIndicesCreateStmt, writeExternalPrimaryKeysCreateStmt, writeForeignReferences, writeLocalReferences, writePrimaryKeyStmt, writeTableAlterStmt, writeTableComment, writeTableCreationStmtEnding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HsqlDbBuilder

public HsqlDbBuilder(PlatformInfo info)
Creates a new builder instance.

Parameters:
info - The platform info
Method Detail

dropTable

public void dropTable(Table table)
               throws IOException
Outputs the DDL to drop the table.

Overrides:
dropTable in class SqlBuilder
Parameters:
table - The table to drop
Throws:
IOException

getSelectLastInsertId

public String getSelectLastInsertId(Table table)
Generates the SQL for querying the id that was created in the last insertion operation. This is obviously only useful for pk fields that are auto-incrementing. A database that does not support this, will return null.

Overrides:
getSelectLastInsertId in class SqlBuilder
Parameters:
table - The table
Returns:
The sql, or null if the database does not support this


Copyright © 2005 Apache Software Foundation. All Rights Reserved.