Class SybaseDictionary

All Implemented Interfaces:
JoinSyntaxes, Configurable, IdentifierConfiguration, ConnectionDecorator, LoggingConnectionDecorator.SQLWarningHandler

public class SybaseDictionary extends AbstractSQLServerDictionary
Dictionary for Sybase. The main point of interest is that by default, every table that is created will have a unique column named "UNQ_INDEX" of the "IDENTITY" type. OpenJPA will not ever utilize this column. However, due to internal Sybase restrictions, this column is required in order to support pessimistic (datastore) locking, since Sybase requires that any tables in a "SELECT ... FOR UPDATE" clause have a unique index that is not included in the list of columns, as described in the Sybase documentation. This behavior can be surpressed by setting the dictionary property CreateIdentityColumn=false. The name of the unique column can be changed by setting the property IdentityColumnName=COLUMN_NAME. A good Sybase type reference is can be found here.
  • Field Details

    • RIGHT_TRUNCATION_ON_SQL

      public static String RIGHT_TRUNCATION_ON_SQL
    • NUMERIC_TRUNCATION_OFF_SQL

      public static String NUMERIC_TRUNCATION_OFF_SQL
    • createIdentityColumn

      public boolean createIdentityColumn
      If true, then whenever the schematool creates a table, it will append an additional IDENTITY column to the table's creation SQL. This is so Sybase will be able to perform SELECT...FOR UPDATE statements.
    • identityColumnName

      public String identityColumnName
      If createIdentityColumn is true, then the identityColumnName will be the name of the additional unique column that will be created.
    • ignoreNumericTruncation

      public boolean ignoreNumericTruncation
      If true, Sybase will ignore numeric truncation on insert or update operations. Otherwise, the operation will fail. The default value, false is in accordance with SQL92.
  • Constructor Details

    • SybaseDictionary

      public SybaseDictionary()
  • Method Details