Class SDriverSybase


  • public class SDriverSybase
    extends SDriver
    This contains Sybase Adaptive Server specific code.
    • Constructor Detail

      • SDriverSybase

        public SDriverSybase()
    • 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 class SDriver
      • 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 class SDriver
      • 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 class SDriver
      • 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 class SDriver