Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-34

Policy for case-sensitivity of identifiers should be configurable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Currently Optiq uses the same case-sensitivity policy as Oracle. If you do not quote an identifier, it is converted to upper-case. If you want to use an already defined object, the match is case-sensitive.

      For example:

      CREATE TABLE emp ...; // creates a table called "EMP"
      SELECT * FROM EMP; // succeeds
      SELECT * FROM "EMP"; // succeeds
      SELECT * FROM "emp"; // fails
      SELECT * FROM emp; // succeeds

      Other databases have different policies than Oracle. As in https://github.com/julianhyde/optiq/issues/33, people would like Optiq to behave like their favorite database, so policy should be configurable.

      The following JDBC methods (in [java.sql.DatabaseMetaData|http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html)) define policy:

      boolean supportsMixedCaseIdentifiers() throws SQLException;
      boolean storesUpperCaseIdentifiers() throws SQLException;
      boolean storesLowerCaseIdentifiers() throws SQLException;
      boolean storesMixedCaseIdentifiers() throws SQLException;
      boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;
      boolean storesUpperCaseQuotedIdentifiers() throws SQLException;
      boolean storesLowerCaseQuotedIdentifiers() throws SQLException;
      boolean storesMixedCaseQuotedIdentifiers() throws SQLException;
      String getIdentifierQuoteString() throws SQLException;
      String getExtraNameCharacters() throws SQLException;

      Not all combinations of those settings make sense, obviously. :]

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/issues/34
      Created by: julianhyde
      Labels: enhancement,
      Created at: Tue Apr 02 23:20:32 CEST 2013
      State: closed

      Attachments

        Activity

          People

            Unassigned Unassigned
            github-import GitHub Import
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: