Class PervasivePlatform

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, CorePlatform<ConversionManager>, Platform

    public class PervasivePlatform
    extends DatabasePlatform

    Purpose: Provides Pervasive SQL DBMS specific behavior.

    Pervasive SQL Platform file
    Contributed by: Pervasive Software, Inc.
    Contributed under bug: 392109

    Developed on Pervasive PSQL Server 11.30

    • Eclipselink Core SRG Test passes with known limitations.
    • Eclipselink JPA SRG Test passes with known limitations.
    • Eclipselink stored procedure tests "CustomSQLTestModel", "StoredProcedureGeneratorModel" pass with known limitations.

    Limitations

    • Updates are not supported on joined queries or queries with group by.
    • The platform method getSelectForUpdateString() currently returns an empty string. This is to avoid avoid joined queries with FOR UPDATE in them, which Pervasive does not support.
    • Columns used in indexes must total no more than 255 bytes in length.
    • Pervasive SQL does not support dynamic parameters in the SELECT list.
    • IDENTITY columns are either 2- or 4-byte integers. Foreign keys referencing such columns must use the same datatypes.
    See Also:
    Serialized Form
    • Constructor Detail

      • PervasivePlatform

        public PervasivePlatform()
    • Method Detail

      • buildClassTypes

        protected java.util.Map<java.lang.String,​java.lang.Class> buildClassTypes()
        Description copied from class: DatabasePlatform
        Return the mapping of class types to database types for the schema framework.
        Overrides:
        buildClassTypes in class DatabasePlatform
      • buildFieldTypes

        protected java.util.Hashtable buildFieldTypes()
        Description copied from class: DatabasePlatform
        Return the mapping of class types to database types for the schema framework.
        Overrides:
        buildFieldTypes in class DatabasePlatform
      • requiresProcedureBrackets

        public boolean requiresProcedureBrackets()
        In CREATE PROCEDURE, Pervasive requires brackets after the procedure name, even if there are no arguments.
        Overrides:
        requiresProcedureBrackets in class DatabasePlatform
      • getProcedureCallHeader

        public java.lang.String getProcedureCallHeader()
        Pervasive uses CALL or EXECUTE not CALL PROCEDURE or EXECUTE PROCEDURE
        Overrides:
        getProcedureCallHeader in class DatabasePlatform
      • shouldPrintStoredProcedureArgumentNameInCall

        public boolean shouldPrintStoredProcedureArgumentNameInCall()
        INTERNAL: Pervasive SQL stored procedure calls do not require the argument name be printed in the call string e.g. call MyStoredProc(?) instead of call MyStoredProc(myvariable = ?)
        Overrides:
        shouldPrintStoredProcedureArgumentNameInCall in class DatabasePlatform
      • toDateOperator

        protected ExpressionOperator toDateOperator()
        Cloned from MySQLPlatform.java
      • toCharOperator

        protected ExpressionOperator toCharOperator()
        Cloned from MySQLPlatform.java
      • dateToStringOperator

        protected ExpressionOperator dateToStringOperator()
        Cloned from MySQLPlatform.java
      • shouldUseJDBCOuterJoinSyntax

        public boolean shouldUseJDBCOuterJoinSyntax()
        JDBC defines an outer join syntax which many drivers do not support. So we normally avoid it.
        Overrides:
        shouldUseJDBCOuterJoinSyntax in class DatabasePlatform
      • printFieldIdentityClause

        public void printFieldIdentityClause​(java.io.Writer writer)
                                      throws ValidationException
        Append the receiver's field 'identity' constraint clause to a writer. Taken from org.eclipse.persistence\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\platform\database\AccessPlatform.java
        Overrides:
        printFieldIdentityClause in class DatabasePlatform
        Throws:
        ValidationException
      • singleArgumentSubstringOperator

        public ExpressionOperator singleArgumentSubstringOperator()
        Override the default SubstringSingleArg operator. Cloned from SybasePlatform.java
      • supportsGlobalTempTables

        public boolean supportsGlobalTempTables()
        Description copied from class: DatabasePlatform
        INTERNAL: Indicates whether the platform supports global temporary tables. "Global" means that an attempt to create temporary table with the same name for the second time results in exception. EclipseLink attempts to create global temporary table in the beginning of UpdateAllQuery, execution and assumes that it already exists in case SQLException results. In the end of UpdateAllQuery execution all rows are removed from the temporary table - it is necessary in case the same temporary table will be used by another UpdateAllQuery in the same transaction. Override this method if the platform supports global temporary tables. Note that this method is ignored in case supportsLocalTempTables() returns true.
        Overrides:
        supportsGlobalTempTables in class DatabasePlatform
      • printFieldTypeSize

        public void printFieldTypeSize​(java.io.Writer writer,
                                       FieldDefinition field,
                                       FieldTypeDefinition fieldType,
                                       boolean shouldPrintFieldIdentityClause)
                                throws java.io.IOException
        Taken from org.eclipse.persistence\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\platform\database\AccessPlatform.java
        Overrides:
        printFieldTypeSize in class DatabasePlatform
        Throws:
        java.io.IOException
      • buildSelectQueryForIdentity

        public ValueReadQuery buildSelectQueryForIdentity()
        INTERNAL: Build the identity query for native sequencing. Taken verbatim from org.eclipse.persistence\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\platform\database\SQLServerPlatform.java
        Overrides:
        buildSelectQueryForIdentity in class DatasourcePlatform
      • getSelectForUpdateString

        public java.lang.String getSelectForUpdateString()
        Temporary workaround to avoid joined queries with FOR UPDATE in them
        Overrides:
        getSelectForUpdateString in class DatabasePlatform
      • isForUpdateCompatibleWithDistinct

        public boolean isForUpdateCompatibleWithDistinct()
        INTERNAL: Indicates whether SELECT DISTINCT ... FOR UPDATE is allowed by the platform (Oracle doesn't allow this).
        Overrides:
        isForUpdateCompatibleWithDistinct in class DatabasePlatform
      • supportsDeleteOnCascade

        public boolean supportsDeleteOnCascade()
        Setting this to false (cf. Sybase) to work around problem that unspecified default delete rule is RESTRICT, even when not allowed due to self-referencing table.
        Overrides:
        supportsDeleteOnCascade in class DatabasePlatform
      • supportsLockingQueriesWithMultipleTables

        public boolean supportsLockingQueriesWithMultipleTables()
        INTERNAL: Indicates whether locking clause could be applied to the query that has more than one table
        Overrides:
        supportsLockingQueriesWithMultipleTables in class DatabasePlatform