OpenJPA
  1. OpenJPA
  2. OPENJPA-1841

Allow DBDictionary to optimize IS [NOT] NULL SQL for specific data types.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      Some databases do not support IS [NOT] NULL on all datatypes.

      For example Sybase does not allow it's clob / blob types (TEXT and IMAGE respectively) to be used with the IS NULL and IS NOT NULL clauses. The datalength() function to determine if the column has any data instead of the generic IS [NOT] NULL clause.

      Oracle has a similar restriction with BLOB / CLOB types.

        Activity

        Michael Dick made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Michael Dick made changes -
        Field Original Value New Value
        Summary Do not generate IS NULL and IS NOT NULL clause for blob / clob types on Sybase Allow DBDictionary to optimize IS [NOT] NULL SQL for specific data types.
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Description Sybase does not allow it's clob / blob types (TEXT and IMAGE respectively) to be used with the IS NULL and IS NOT NULL clauses.

        Instead we should use the datalength() function to determine if the column has any data.
        Some databases do not support IS [NOT] NULL on all datatypes.

        For example Sybase does not allow it's clob / blob types (TEXT and IMAGE respectively) to be used with the IS NULL and IS NOT NULL clauses. The datalength() function to determine if the column has any data instead of the generic IS [NOT] NULL clause.

        Oracle has a similar restriction with BLOB / CLOB types.
        Michael Dick created issue -

          People

          • Assignee:
            Michael Dick
            Reporter:
            Michael Dick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development