# Class HSQLDBAdapter

java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.hsqldb.HSQLDBAdapter

All Implemented Interfaces:
  `DbAdapter`

public class HSQLDBAdapter extends JdbcAdapter
DbAdapter implementation for the HSQLDB RDBMS.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TRIM_FUNCTION`

  ### Fields inherited from class JdbcAdapter

  `caseInsensitiveCollations, defaultCharColumnLength, ejbqlTranslator, extendedTypes, logger, nativeColumnTypes, quotingStrategy, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HSQLDBAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `configureExtendedTypes(ExtendedTypeMap map)`
  Called from `JdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry)` to load adapter-specific types into the ExtendedTypeMap right after the default types are loaded, but before the DI overrides are.
  `protected EJBQLTranslator`
  `createEJBQLTranslator()`
  Creates and returns an `EJBQLTranslator` used to generate visitors for EJBQL to SQL translations.
  `String`
  `createFkConstraint(DbRelationship rel)`
  Adds an ADD CONSTRAINT clause to a relationship constraint.
  `protected NativeColumnType[]`
  `createNativeTypes()`
  Returns the database-native types supported by this adapter.
  `String`
  `createTable(DbEntity ent)`
  Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".
  `void`
  `createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column)`
  Appends SQL for column creation to CREATE TABLE buffer.
  `String`
  `createUniqueConstraint(DbEntity source, Collection<DbAttribute> columns)`
  Returns a DDL string to create a unique constraint over a set of columns.
  `SQLAction`
  `getAction(Query query, DataNode node)`
  Uses special action builder to create the right action.
  `ProcedureTranslator`
  `getProcedureTranslator(ProcedureQuery query, EntityResolver entityResolver)`
  Returns the `ProcedureTranslator` for the given query.
  `protected String`
  `getSchemaName(DbEntity entity)`
  Returns DbEntity schema name for 1.8 and on.
  `SQLTreeProcessor`
  `getSqlTreeProcessor()`
  `protected String`
  `getTableName(DbEntity entity)`
  Generate fully-qualified name for 1.8 and on.

  ### Methods inherited from class JdbcAdapter

  `bind, bindParameter, bindParameter, buildAttribute, createPkGenerator, createQuotingStrategy, createTableAppendPKClause, defaultCharColumnLength, dropTableStatements, externalTypesForJdbcType, getBatchTerminator, getEjbqlTranslator, getExtendedTypes, getQuotingStrategy, getQuotingStrategy, getSelectTranslator, getSQLLogger, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, nativeColumnTypes, setEjbqlTranslator, setEjbqlTranslatorFactory, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, sizeAndScale, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, typeSupportsScale, unwrap`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface DbAdapter

  `getEjbqlTranslatorFactory, preferredBindingType, preferredNativeColumnType, supportsGeneratedKeysForBatchInserts`

- ## Field Details

  - ### TRIM_FUNCTION

    public static final String TRIM_FUNCTION
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### HSQLDBAdapter

    public HSQLDBAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry)

- ## Method Details

  - ### createNativeTypes

    protected NativeColumnType[] createNativeTypes()
    Description copied from class: `JdbcAdapter`
    Returns the database-native types supported by this adapter.
    Overrides:
      `createNativeTypes` in class `JdbcAdapter`

  - ### configureExtendedTypes

    protected void configureExtendedTypes(ExtendedTypeMap map)
    Description copied from class: `JdbcAdapter`
    Called from `JdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry)` to load adapter-specific types into the ExtendedTypeMap right after the default types are loaded, but before the DI overrides are. This method has specific implementations in JdbcAdapter subclasses.
    Overrides:
      `configureExtendedTypes` in class `JdbcAdapter`
    Since:
      4.0

  - ### getSqlTreeProcessor

    public SQLTreeProcessor getSqlTreeProcessor()
    Specified by:
      `getSqlTreeProcessor` in interface `DbAdapter`
    Overrides:
      `getSqlTreeProcessor` in class `JdbcAdapter`
    Returns:
      `SQLTreeProcessor` that can adjust SQL tree to specific database flavour
    Since:
      4.2

  - ### getProcedureTranslator

    public ProcedureTranslator getProcedureTranslator(ProcedureQuery query, EntityResolver entityResolver)
    Description copied from interface: `DbAdapter`
    Returns the `ProcedureTranslator` for the given query. The default implementation ignores the query, but the parameter is retained so adapters can pick a translator based on it.
    Specified by:
      `getProcedureTranslator` in interface `DbAdapter`
    Overrides:
      `getProcedureTranslator` in class `JdbcAdapter`
    Since:
      5.0

  - ### createEJBQLTranslator

    protected EJBQLTranslator createEJBQLTranslator()
    Description copied from class: `JdbcAdapter`
    Creates and returns an `EJBQLTranslator` used to generate visitors for EJBQL to SQL translations. This method should be overriden by subclasses that need to customize EJBQL generation.
    Overrides:
      `createEJBQLTranslator` in class `JdbcAdapter`
    Since:
      4.0

  - ### getTableName

    protected String getTableName(DbEntity entity)
    Generate fully-qualified name for 1.8 and on. Subclass generates unqualified name.
    Since:
      1.2

  - ### getSchemaName

    protected String getSchemaName(DbEntity entity)
    Returns DbEntity schema name for 1.8 and on. Subclass generates unqualified name.
    Since:
      1.2

  - ### getAction

    public SQLAction getAction(Query query, DataNode node)
    Uses special action builder to create the right action.
    Specified by:
      `getAction` in interface `DbAdapter`
    Overrides:
      `getAction` in class `JdbcAdapter`
    Since:
      1.2

  - ### createUniqueConstraint

    public String createUniqueConstraint(DbEntity source, Collection<DbAttribute> columns)
    Returns a DDL string to create a unique constraint over a set of columns.
    Specified by:
      `createUniqueConstraint` in interface `DbAdapter`
    Overrides:
      `createUniqueConstraint` in class `JdbcAdapter`
    Since:
      1.1

  - ### createFkConstraint

    public String createFkConstraint(DbRelationship rel)
    Adds an ADD CONSTRAINT clause to a relationship constraint.
    Specified by:
      `createFkConstraint` in interface `DbAdapter`
    Overrides:
      `createFkConstraint` in class `JdbcAdapter`
    See Also:
      - `JdbcAdapter.createFkConstraint(DbRelationship)`

  - ### createTable

    public String createTable(DbEntity ent)
    Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".
    Specified by:
      `createTable` in interface `DbAdapter`
    Overrides:
      `createTable` in class `JdbcAdapter`
    Since:
      1.2

  - ### createTableAppendColumn

    public void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column)
    Description copied from class: `JdbcAdapter`
    Appends SQL for column creation to CREATE TABLE buffer.
    Specified by:
      `createTableAppendColumn` in interface `DbAdapter`
    Overrides:
      `createTableAppendColumn` in class `JdbcAdapter`
    Parameters:
      `sqlBuffer` - the `StringBuffer` to append the column type to
      `column` - the `DbAttribute` defining the column to append type for