we like "WITH"

geir

On Feb 20, 2008, at 12:15 PM, Patrick Linskey wrote:

+        selectWordSet.add("WITH");
+        selectWordSet.add("WITH");

Why do we add 'WITH' twice here?

-Patrick

On Tue, Feb 19, 2008 at 9:32 AM,  <[EMAIL PROTECTED]> wrote:
Author: mikedd
Date: Tue Feb 19 09:32:05 2008
New Revision: 629168

URL: http://svn.apache.org/viewvc?rev=629168&view=rev
Log:
OPENJPA-517

Modified:
openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/ openjpa/jdbc/sql/DBDictionary.java openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/ openjpa/jdbc/sql/OracleDictionary.java openjpa/branches/1.0.x/openjpa-project/src/doc/manual/ ref_guide_dbsetup.xml

Modified: openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/ apache/openjpa/jdbc/sql/DBDictionary.java
URL: 
http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=629168&r1=629167&r2=629168&view=diff
= = = = = = = = = ===================================================================== --- openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/ openjpa/jdbc/sql/DBDictionary.java (original) +++ openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/ openjpa/jdbc/sql/DBDictionary.java Tue Feb 19 09:32:05 2008
@@ -174,6 +174,7 @@
    public String reservedWords = null;
    public String systemSchemas = null;
    public String systemTables = null;
+    public String selectWords = null;
    public String fixedSizeTypeNames = null;
    public String schemaCase = SCHEMA_CASE_UPPER;

@@ -3876,10 +3877,14 @@
        if (fixedSizeTypeNames != null)
            fixedSizeTypeNameSet.addAll(Arrays.asList(Strings.split
                (fixedSizeTypeNames.toUpperCase(), ",", 0)));
-
+
// if user has unset sequence sql, null it out so we know sequences
        // aren't supported
nextSequenceQuery = StringUtils.trimToNull(nextSequenceQuery);
+
+        if (selectWords != null)
+ selectWordSet.addAll(Arrays.asList(Strings.split(selectWords
+                    .toUpperCase(), ",", 0)));
    }

    //////////////////////////////////////

Modified: openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/ apache/openjpa/jdbc/sql/OracleDictionary.java
URL: 
http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=629168&r1=629167&r2=629168&view=diff
= = = = = = = = = ===================================================================== --- openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/ openjpa/jdbc/sql/OracleDictionary.java (original) +++ openjpa/branches/1.0.x/openjpa-jdbc/src/main/java/org/apache/ openjpa/jdbc/sql/OracleDictionary.java Tue Feb 19 09:32:05 2008
@@ -155,6 +155,9 @@
"LONG", "MAXEXTENTS", "MINUS", "MODE", "NOAUDIT", "NOCOMPRESS",
            "NOWAIT", "OFFLINE", "ONLINE", "PCTFREE", "ROW",
        }));
+
+        selectWordSet.add("WITH");
+        selectWordSet.add("WITH");
    }

    public void endConfiguration() {

Modified: openjpa/branches/1.0.x/openjpa-project/src/doc/manual/ ref_guide_dbsetup.xml
URL: 
http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml?rev=629168&r1=629167&r2=629168&view=diff
= = = = = = = = = ===================================================================== --- openjpa/branches/1.0.x/openjpa-project/src/doc/manual/ ref_guide_dbsetup.xml (original) +++ openjpa/branches/1.0.x/openjpa-project/src/doc/manual/ ref_guide_dbsetup.xml Tue Feb 19 09:32:05 2008
@@ -1009,6 +1009,22 @@
 this database, beyond the standard SQL92 keywords.
                    </para>
                </listitem>
+                <listitem id="DBDictionary.SelectWords">
+                    <para>
+                    <indexterm>
+                        <primary>
+                            SQL
+                        </primary>
+                        <secondary>
+                            SelectWords
+                        </secondary>
+                    </indexterm>
+<literal>SelectWords</literal>: A comma-separated list of keywords which may be +used to start a SELECT statement for this database. If an application executes +a native SQL statement which begins with SelectWords OpenJPA will treat the
+statement as a SELECT statement rather than an UPDATE statement.
+                    </para>
+                </listitem>
                <listitem id="DBDictionary.SystemTables">
                    <para>
                    <indexterm>






--
Patrick Linskey
202 669 5907

Reply via email to