|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--kodo.jdbc.sql.DBDictionary
|
+--kodo.jdbc.sql.AbstractSQLServerDictionary
|
+--kodo.jdbc.sql.SybaseDictionary
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. Kodo 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.
| Fields inherited from class kodo.jdbc.sql.DBDictionary |
CENTI, DECI, MICRO, MILLI, NANO, SCHEMA_CASE_DEFAULT, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, SEC |
| Constructor Summary | |
SybaseDictionary()
|
|
| Method Summary | |
Connection |
decorate(Connection conn)
Decorate all connections with one that handles some Sybase autocommit bugs. |
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object. |
boolean |
getCreateIdentityColumn()
If true, then whenever the schematool creates a
table, it will append an additional IDENTITY column to the
table's creation SQL. |
String[] |
getCreateTableSQL(Table table)
Return a series of SQL statements to create the given table, complete with columns. |
protected String |
getDeclareColumnSQL(Column col,
boolean alter)
Return the declaration SQL for the given column. |
String[] |
getDropColumnSQL(Column column)
Return a series of SQL statements to drop the given column from its table. |
String |
getIdentityColumnName()
If getCreateIdentityColumn() is true, then the
identityColumnName will be the name of the
additional unique column that will be created. |
int |
getJDBCType(int metaTypeCode,
boolean lob)
Return the preferred Types constant for the given
FieldMapping constant. |
void |
refSchemaComponents(Table table)
Increment the reference count of any table components that this dictionary adds that are not used by mappings. |
void |
setBigInteger(PreparedStatement stmnt,
int idx,
BigInteger val)
Set the given value as a parameter to the statement. |
void |
setCreateIdentityColumn(boolean createIdentityColumn)
If true, then whenever the schematool creates a
table, it will append an additional IDENTITY column to the
table's creation SQL. |
void |
setDBMetaData(DBMetaData meta)
Set the database metadata for this dictionary. |
void |
setIdentityColumnName(String identityColumnName)
If getCreateIdentityColumn() is true, then the
identityColumnName will be the name of the
additional unique column that will be created. |
| Methods inherited from class kodo.jdbc.sql.AbstractSQLServerDictionary |
configureReflectedColumn, getFullName, getReservedWords, setNull, supportsSizeInColumnDefinition |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SybaseDictionary()
| Method Detail |
public void setDBMetaData(DBMetaData meta)
throws SQLException
DBDictionarysetDBMetaData in class DBDictionary
public int getJDBCType(int metaTypeCode,
boolean lob)
DBDictionaryTypes constant for the given
FieldMapping constant.getJDBCType in class DBDictionary
public void setBigInteger(PreparedStatement stmnt,
int idx,
BigInteger val)
throws SQLException
DBDictionarysetBigInteger in class DBDictionarypublic void setCreateIdentityColumn(boolean createIdentityColumn)
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.public boolean getCreateIdentityColumn()
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.public void setIdentityColumnName(String identityColumnName)
getCreateIdentityColumn() is true, then the
identityColumnName will be the name of the
additional unique column that will be created.public String getIdentityColumnName()
getCreateIdentityColumn() is true, then the
identityColumnName will be the name of the
additional unique column that will be created.public void endConfiguration()
ConfigurableendConfiguration in class DBDictionarypublic String[] getCreateTableSQL(Table table)
DBDictionarygetCreateTableSQL in class DBDictionary
protected String getDeclareColumnSQL(Column col,
boolean alter)
DBDictionaryDBDictionary.getCreateTableSQL(kodo.jdbc.schema.Table) and
DBDictionary.getAddColumnSQL(kodo.jdbc.schema.Column).getDeclareColumnSQL in class DBDictionarypublic String[] getDropColumnSQL(Column column)
DBDictionaryDBMetaData is checked for support automatically. Returns
ALTER TABLE <table name> DROP COLUMN <col name>
by default.getDropColumnSQL in class DBDictionarypublic void refSchemaComponents(Table table)
DBDictionaryrefSchemaComponents in class DBDictionary
public Connection decorate(Connection conn)
throws SQLException
decorate in class DBDictionary
|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||