Package simpleorm.drivers
Class SDriverSybase
- java.lang.Object
-
- simpleorm.sessionjdbc.SDriver
-
- simpleorm.drivers.SDriverSybase
-
public class SDriverSybase extends SDriver
This contains Sybase Adaptive Server specific code.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class simpleorm.sessionjdbc.SDriver
SDriver.OffsetStrategy
-
-
Constructor Summary
Constructors Constructor Description SDriverSybase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
columnTypeSQL(SFieldScalar field, java.lang.String defalt)
Sybase only understands DATETIME (and SMALLDATETIME) and timestamp (must be lc!)protected java.lang.String
driverName()
The driver name to be compared to getMetaData().getDriverName()protected java.lang.String
forUpdateSQL(boolean forUpdate)
Returns update clause, may not be valid in certain lock modes etc.protected java.lang.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
-
-
-
-
Method Detail
-
driverName
protected java.lang.String driverName()
Description copied from class:SDriver
The driver name to be compared to getMetaData().getDriverName()- Overrides:
driverName
in classSDriver
-
columnTypeSQL
protected java.lang.String columnTypeSQL(SFieldScalar field, java.lang.String defalt)
Sybase only understands DATETIME (and SMALLDATETIME) and timestamp (must be lc!)- Overrides:
columnTypeSQL
in classSDriver
-
forUpdateSQL
protected java.lang.String forUpdateSQL(boolean forUpdate)
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
protected java.lang.String postFromSQL(boolean forUpdate)
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
-
-