Package simpleorm.drivers
Class SDriverSybase
java.lang.Object
simpleorm.sessionjdbc.SDriver
simpleorm.drivers.SDriverSybase
This contains Sybase Adaptive Server specific code.
-
Nested Class Summary
Nested classes/interfaces inherited from class simpleorm.sessionjdbc.SDriver
SDriver.OffsetStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
columnTypeSQL
(SFieldScalar field, String defalt) Sybase only understands DATETIME (and SMALLDATETIME) and timestamp (must be lc!)protected String
The driver name to be compared to getMetaData().getDriverName()protected String
forUpdateSQL
(boolean forUpdate) Returns update clause, may not be valid in certain lock modes etc.protected String
postFromSQL
(boolean forUpdate) MSSQL and Sybase do not support FOR UPDATE.Methods inherited from class simpleorm.sessionjdbc.SDriver
addNull, alterTableAddColumnSQL, alterTableDropColumnSQL, appendColumnName, appendQuotedIdentifier, appendQuotedIdentifier, appendTableName, clauseSeparator, createSequenceDDL, createTableSQL, deleteSQL, dropSequenceDDL, dropTableNoError, foreignKeysSQL, fromSQL, generateKeySelectMax, generateKeySequence, getLogger, getOffsetStrategy, getSession, indexKeySQL, insertSQL, joinSQL, limitSQL, makeForeignKeyIndexSQL, mapForeignKeys, maxIdentNameLength, postColumnSQL, postTablePostParenSQL, postTablePreParenSQL, primaryKeySQL, queryExecuteFactory, registerDriver, selectSQL, selectSQL, supportsKeySequences, supportsLocking, updateSQL, whereSQL, wholeColumnSQL
-
Constructor Details
-
SDriverSybase
public SDriverSybase()
-
-
Method Details
-
driverName
Description copied from class:SDriver
The driver name to be compared to getMetaData().getDriverName()- Overrides:
driverName
in classSDriver
-
columnTypeSQL
Sybase only understands DATETIME (and SMALLDATETIME) and timestamp (must be lc!)- Overrides:
columnTypeSQL
in classSDriver
-
forUpdateSQL
Description copied from class:SDriver
Returns update clause, may not be valid in certain lock modes etc. Right at the end of the query.Oracle, Postgresql, and new in MS SQL 2005 support data versioning or snapshots. This means that repeatable read is achieved by caching the previous value read instead of using read locks. This approach makes it critical to add FOR UPDATE where appropriate or there is effectively no locking.
Indeed, in Oracle, you are guaranteed that several SELECTS will return the same value, but a subsequent SELECT FOR UPDATE in the same transaction may return a different value.
- Overrides:
forUpdateSQL
in classSDriver
-
postFromSQL
MSSQL and Sybase do not support FOR UPDATE. But the docs say to use WITH (XLOCK). But Jorge says that it is unnecessary and makes SimpleORM fail. Very odd.- Overrides:
postFromSQL
in classSDriver
-