openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtyle...@apache.org
Subject svn commit: r1044821 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/ openjpa-project/src/doc/manual/
Date Sun, 12 Dec 2010 13:53:52 GMT
Author: mtylenda
Date: Sun Dec 12 13:53:52 2010
New Revision: 1044821

URL: http://svn.apache.org/viewvc?rev=1044821&view=rev
Log:
OPENJPA-1863: Update HSQLDictionary for HSQLDB 2.0 - new SQL state value, fix getSequencesSQL
method.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml
    openjpa/trunk/openjpa-project/src/doc/manual/supported_databases.xml

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java?rev=1044821&r1=1044820&r2=1044821&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
Sun Dec 12 13:53:52 2010
@@ -231,17 +231,22 @@ public class HSQLDictionary extends DBDi
 
     @Override
     protected String getSequencesSQL(String schemaName, String sequenceName) {
+        return getSequencesSQL(DBIdentifier.newSchema(schemaName), DBIdentifier.newSequence(sequenceName));
+    }
+
+    @Override
+    protected String getSequencesSQL(DBIdentifier schemaName, DBIdentifier sequenceName)
{
         StringBuilder buf = new StringBuilder();
         buf.append("SELECT SEQUENCE_SCHEMA, SEQUENCE_NAME FROM ").
             append("INFORMATION_SCHEMA.SYSTEM_SEQUENCES");
-        if (schemaName != null || sequenceName != null)
+        if (!DBIdentifier.isNull(schemaName) || !DBIdentifier.isNull(sequenceName))
             buf.append(" WHERE ");
-        if (schemaName != null) {
+        if (!DBIdentifier.isNull(schemaName)) {
             buf.append("SEQUENCE_SCHEMA = ?");
-            if (sequenceName != null)
+            if (!DBIdentifier.isNull(sequenceName))
                 buf.append(" AND ");
         }
-        if (sequenceName != null)
+        if (!DBIdentifier.isNull(sequenceName))
             buf.append("SEQUENCE_NAME = ?");
         return buf.toString();
     }
@@ -263,6 +268,14 @@ public class HSQLDictionary extends DBDi
     public Column[] getColumns(DatabaseMetaData meta, String catalog,
         String schemaName, String tableName, String columnName, Connection conn)
         throws SQLException {
+        return getColumns(meta, DBIdentifier.newCatalog(catalog), DBIdentifier.newSchema(schemaName),
+            DBIdentifier.newTable(tableName), DBIdentifier.newColumn(columnName), conn);
+    }
+
+    @Override
+    public Column[] getColumns(DatabaseMetaData meta, DBIdentifier catalog,
+            DBIdentifier schemaName, DBIdentifier tableName, DBIdentifier columnName, Connection
conn)
+        throws SQLException {
         Column[] cols = super.getColumns(meta, catalog, schemaName, tableName,
             columnName, conn);
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml?rev=1044821&r1=1044820&r2=1044821&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml
Sun Dec 12 13:53:52 2010
@@ -112,7 +112,7 @@
 	<dictionary class="org.apache.openjpa.jdbc.sql.HSQLDictionary">
 		<lock></lock>
 		<referential-integrity>-9</referential-integrity>
-		<object-exists>23000</object-exists>
+		<object-exists>23000,23505</object-exists>
 		<object-not-found></object-not-found>
 		<optimistic></optimistic>
 		<query></query>

Modified: openjpa/trunk/openjpa-project/src/doc/manual/supported_databases.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/supported_databases.xml?rev=1044821&r1=1044820&r2=1044821&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/supported_databases.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/supported_databases.xml Sun Dec 12 13:53:52
2010
@@ -91,7 +91,7 @@ users, but may not support every feature
                         Apache Derby Embedded JDBC Driver
                     </entry>
                     <entry colname="drivversion">
-                        Same as DB Version
+                        Same as Database Version
                     </entry>
                 </row>
                 <row>
@@ -344,7 +344,7 @@ databases that have been fully tested ag
                         H2
                     </entry>
                     <entry colname="drivversion">
-                        1.1.118
+                        Same as Database Version
                     </entry>
                 </row>
                 <row>
@@ -352,13 +352,13 @@ databases that have been fully tested ag
                         <link linkend="dbsupport_hypersonic">Hypersonic Database Engine</link>
                     </entry>
                     <entry colname="dbversion">
-                        1.8.0
+                        1.8.0, 2.0.1 RC2
                     </entry>
                     <entry colname="drivname">
                         Hypersonic
                     </entry>
                     <entry colname="drivversion">
-                        1.8.0
+                        Same as Database Version
                     </entry>
                 </row>
                 <row>



Mime
View raw message