kodo.jdbc.sql
Class HSQLDictionary
java.lang.Object
|
+--kodo.jdbc.sql.DBDictionary
|
+--kodo.jdbc.sql.HSQLDictionary
- All Implemented Interfaces:
- Configurable, ConnectionDecorator
- public class HSQLDictionary
- extends DBDictionary
Dictionary for Hypersonic SQL database.
Field Summary |
boolean |
cacheTables
Sets whether HSQL should use "CREATED CACHED TABLE" rather than
"CREATE TABLE", which allows disk-based database operations. |
Fields inherited from class kodo.jdbc.sql.DBDictionary |
arrayTypeName, autoIncrementClause, autoIncrementTypeName, batchLimit, batchParameterLimit, bigintTypeName, binaryTypeName, bitTypeName, blobTypeName, catalogSeparator, CENTI, charTypeName, clobTypeName, conf, connected, CONS_NAME_AFTER, CONS_NAME_BEFORE, CONS_NAME_MID, constraintNameMode, createPrimaryKeys, datePrecision, dateTypeName, DECI, decimalTypeName, defaultSchemaName, distinctCountColumnSeparator, distinctTypeName, doubleTypeName, driverVendor, fixedSizeTypeNameSet, floatTypeName, forUpdateClause, initializationSQL, integerTypeName, javaObjectTypeName, joinSyntax, lastGeneratedKeyQuery, log, longVarbinaryTypeName, longVarcharTypeName, maxAutoIncrementNameLength, maxCharacterFieldLength, maxColumnNameLength, maxForeignKeyNameLength, maxIndexesPerTable, maxIndexNameLength, maxPrimaryKeyNameLength, maxTableNameLength, MICRO, MILLI, NANO, nullTypeName, numericTypeName, otherTypeName, platform, realTypeName, refTypeName, requiresAliasForSubselect, requiresAutoCommitForMetadata, reservedWords, reservedWordSet, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, schemaCase, SEC, simulateLocking, smallintTypeName, storageLimitationsFatal, storeCharsAsNumbers, storeLargeNumbersAsStrings, stringLengthFunction, structTypeName, supportsAlterTableWithAddColumn, supportsAlterTableWithDropColumn, supportsAutoIncrement, supportsCascadeDeleteAction, supportsDefaultDeleteAction, supportsDeferredConstraints, supportsForeignKeys, supportsHaving, supportsLockingWithDistinctClause, supportsLockingWithInnerJoin, supportsLockingWithMultipleTables, supportsLockingWithOrderClause, supportsLockingWithOuterJoin, supportsLockingWithSelectRange, supportsMultipleNontransactionalResultSets, supportsNullDeleteAction, supportsNullTableForGetColumns, supportsNullTableForGetImportedKeys, supportsNullTableForGetIndexInfo, supportsNullTableForGetPrimaryKeys, supportsQueryTimeout, supportsRestrictDeleteAction, supportsSchemaForGetColumns, supportsSchemaForGetTables, supportsSelectEndIndex, supportsSelectForUpdate, supportsSelectStartIndex, supportsSubselect, supportsTotalCountsForBatch, supportsUpdateCountsForBatch, systemSchemas, systemSchemaSet, systemTables, systemTableSet, tableForUpdateClause, tableTypes, timestampTypeName, timeTypeName, tinyintTypeName, toLowerCaseFunction, toUpperCaseFunction, useGetBestRowIdentifierForPrimaryKeys, useGetBytesForBlobs, useGetObjectForBlobs, useGetStringForClobs, useSchemaName, useSetBytesForBlobs, useSetStringForClobs, validationSQL, varbinaryTypeName, varcharTypeName, VENDOR_DATADIRECT, VENDOR_OTHER |
Method Summary |
protected void |
appendSelectPreRange(SQLBuffer buf,
long start,
long end)
If this dictionary places range limits on select statements just after
the SELECT keyword, use this method to append the range SQL. |
String[] |
getAddColumnSQL(<>Column column)
|
String[] |
getAddPrimaryKeySQL(PrimaryKey pk)
Return a series of SQL statements to add the given primary key to
its table. |
String[] |
getCreateTableSQL(<>Table table)
|
String[] |
getDropPrimaryKeySQL(PrimaryKey pk)
Return a series of SQL statements to drop the given primary key from
its table. |
int |
getPreferredType(int type)
Return the preferred Types type for the given one. |
protected String |
getPrimaryKeyConstraintSQL(PrimaryKey pk)
Return the declaration SQL for the given primary key. |
void |
indexOf(SQLBuffer buf,
FilterValue str,
FilterValue find,
FilterValue start)
Invoke this database's indexOf function. |
boolean |
isSystemIndex(String name,
<>Table table)
|
JDOException |
newDataStoreException(String msg,
SQLException[] causes,
Object failed)
Return a new JDO exception that wraps causes . |
void |
setLong(PreparedStatement stmnt,
int idx,
long val)
Set the given value as a parameter to the statement. |
Methods inherited from class kodo.jdbc.sql.DBDictionary |
appendSelectPostRange, appendSize, assertSupport, canBatch, canOuterJoin, connectedConfiguration, convertSchemaCase, decorate, endConfiguration, getAddColumnSQL, getAddForeignKeySQL, getArray, getAsciiStream, getBigDecimal, getBigInteger, getBinaryStream, getBlob, getBlobObject, getBoolean, getByte, getBytes, getCatalogNameForMetadata, getChar, getCharacterStream, getClob, getClobString, getColumnNameForMetadata, getColumns, getCreateIndexSQL, getCreateTableSQL, getDate, getDate, getDeclareColumnSQL, getDouble, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropTableSQL, getFloat, getForeignKeyConstraintSQL, getFrom, getFromSelect, getFullName, getFullName, getGeneratedKey, getGeneratedKeySequenceName, getImportedKeys, getIndexInfo, getInt, getJDBCType, getLocale, getLong, getObject, getPrimaryKeys, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getRef, getSchemaNameForMetadata, getSelects, getShort, getString, getTableNameForMetadata, getTables, getTime, getTimestamp, getTypeName, getValidColumnName, getValidForeignKeyName, getValidIndexName, getValidPrimaryKeyName, getValidTableName, getWhere, isSystemIndex, isSystemTable, makeNameValid, newColumn, newForeignKey, newIndex, newPrimaryKey, newTable, refSchemaComponents, replaceMapping, replaceMapping, replaceMappingFactory, replaceSchemaFactory, serialize, setArray, setAsciiStream, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBlobObject, setBoolean, setByte, setBytes, setChar, setCharacterStream, setClob, setClobString, setConfiguration, setDate, setDate, setDouble, setFloat, setInt, setJoinSyntax, setLocale, setNull, setObject, setRef, setShort, setString, setTime, setTimestamp, setUnknown, startConfiguration, storageWarning, substring, supportsLocking, supportsRandomAccessResultSet, toNativeJoin, toSelect, toSelect, toSelectCount, toSQL92Join, toTraditionalJoin |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cacheTables
public boolean cacheTables
- Sets whether HSQL should use "CREATED CACHED TABLE" rather than
"CREATE TABLE", which allows disk-based database operations.
HSQLDictionary
public HSQLDictionary()
getPreferredType
public int getPreferredType(int type)
- Description copied from class:
DBDictionary
- Return the preferred
Types
type for the given one. Returns
the given type by default.
- Overrides:
getPreferredType
in class DBDictionary
getAddPrimaryKeySQL
public String[] getAddPrimaryKeySQL(PrimaryKey pk)
- Description copied from class:
DBDictionary
- Return a series of SQL statements to add the given primary key to
its table. Return an empty array if operation not supported.
Returns
ALTER TABLE <table name> ADD
<pk cons sql >
by default.
- Overrides:
getAddPrimaryKeySQL
in class DBDictionary
getDropPrimaryKeySQL
public String[] getDropPrimaryKeySQL(PrimaryKey pk)
- Description copied from class:
DBDictionary
- Return a series of SQL statements to drop the given primary key from
its table. Return an empty array if operation not supported.
Returns
ALTER TABLE <table name> DROP CONSTRAINT
<pk name>
by default.
- Overrides:
getDropPrimaryKeySQL
in class DBDictionary
getAddColumnSQL
public String[] getAddColumnSQL(<>Column column)
getCreateTableSQL
public String[] getCreateTableSQL(<>Table table)
getPrimaryKeyConstraintSQL
protected String getPrimaryKeyConstraintSQL(PrimaryKey pk)
- Description copied from class:
DBDictionary
- Return the declaration SQL for the given primary key. This method is
used from within
DBDictionary.getCreateTableSQL(kodo.jdbc.schema.Table)
and
DBDictionary.getAddPrimaryKeySQL(kodo.jdbc.schema.PrimaryKey)
. Returns
CONSTRAINT <pk name> PRIMARY KEY (<col list>)
by default.
- Overrides:
getPrimaryKeyConstraintSQL
in class DBDictionary
isSystemIndex
public boolean isSystemIndex(String name,
<>Table table)
setLong
public void setLong(PreparedStatement stmnt,
int idx,
long val)
throws SQLException
- Description copied from class:
DBDictionary
- Set the given value as a parameter to the statement.
- Overrides:
setLong
in class DBDictionary
appendSelectPreRange
protected void appendSelectPreRange(SQLBuffer buf,
long start,
long end)
- Description copied from class:
DBDictionary
- If this dictionary places range limits on select statements just after
the SELECT keyword, use this method to append the range SQL.
- Overrides:
appendSelectPreRange
in class DBDictionary
indexOf
public void indexOf(SQLBuffer buf,
FilterValue str,
FilterValue find,
FilterValue start)
- Description copied from class:
DBDictionary
- Invoke this database's indexOf function.
- Overrides:
indexOf
in class DBDictionary
- Following copied from class:
kodo.jdbc.sql.DBDictionary
- Parameters:
buf
- the SQL buffer to write the indexOf invocation tostr
- a query value representing the target stringsearch
- a query value representing the search stringstart
- a query value representing the start index, or null
to start at the beginning
newDataStoreException
public JDOException newDataStoreException(String msg,
SQLException[] causes,
Object failed)
- Description copied from class:
DBDictionary
- Return a new JDO exception that wraps
causes
.
However, the details of exactly what type of exception is returned can
be determined by the implementation. This may take into account
DB-specific exception information in causes
.
- Overrides:
newDataStoreException
in class DBDictionary
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.