db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r332796 - in /db/torque: runtime/trunk/src/java/org/apache/torque/adapter/ runtime/trunk/xdocs/ test/trunk/profile/derby/ test/trunk/test-project/src/java/org/apache/torque/
Date Sat, 12 Nov 2005 16:20:26 GMT
Author: tfischer
Date: Sat Nov 12 08:20:10 2005
New Revision: 332796

URL: http://svn.apache.org/viewcvs?rev=332796&view=rev
Log:
Fixed limit and offset for Derby
Derby is now marked as officially supported
added some fixes in the runtimetest for Derby

Modified:
    db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java
    db/torque/runtime/trunk/xdocs/changes.xml
    db/torque/runtime/trunk/xdocs/index.xml
    db/torque/test/trunk/profile/derby/Torque.properties
    db/torque/test/trunk/profile/derby/project.properties
    db/torque/test/trunk/profile/derby/project.xml
    db/torque/test/trunk/test-project/src/java/org/apache/torque/DataTest.java

Modified: db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java
URL: http://svn.apache.org/viewcvs/db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java?rev=332796&r1=332795&r2=332796&view=diff
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java Sat Nov 12 08:20:10
2005
@@ -106,15 +106,4 @@
             throws SQLException
     {
     }
-
-    /**
-     * This method is used to check whether the database supports
-     * limiting the size of the resultset.
-     *
-     * @return LIMIT_STYLE_DB2.
-     */
-    public int getLimitStyle()
-    {
-        return DB.LIMIT_STYLE_DB2;
-    }
 }

Modified: db/torque/runtime/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/db/torque/runtime/trunk/xdocs/changes.xml?rev=332796&r1=332795&r2=332796&view=diff
==============================================================================
--- db/torque/runtime/trunk/xdocs/changes.xml (original)
+++ db/torque/runtime/trunk/xdocs/changes.xml Sat Nov 12 08:20:10 2005
@@ -26,6 +26,9 @@
   <body>
 
   <release version="3.2-rc3-dev" date="in SVN">
+    <action type="fix" dev="tfischer">
+      Fixed support for limit and offset for Derby in the runtime.
+    </action>
     <action type="add" dev="tfischer">
       Added hyperlinks to foreign key in the documentation to point to 
       the referenced table.

Modified: db/torque/runtime/trunk/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/db/torque/runtime/trunk/xdocs/index.xml?rev=332796&r1=332795&r2=332796&view=diff
==============================================================================
--- db/torque/runtime/trunk/xdocs/index.xml (original)
+++ db/torque/runtime/trunk/xdocs/index.xml Sat Nov 12 08:20:10 2005
@@ -78,6 +78,12 @@
           <td><a href="mailto:Sweaver@rippe.com">Scott Weaver</a></td>
         </tr>
         <tr>
+          <td>Derby</td>
+          <td>org.apache.derby.jdbc.EmbeddedDriver</td>
+          <td>Only the embedded driver works. idMethod=&quot;native&quot; does
not work.</td>
+          <td><a href="mailto:fischer@seitenbau.de">Thomas Fischer</a></td>
+        </tr>
+        <tr>
           <td>Firebird</td>
           <td>org.firebirdsql.jdbc.FBDriver</td>
           <td>idMethod=&quot;native&quot; does not work</td>

Modified: db/torque/test/trunk/profile/derby/Torque.properties
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/profile/derby/Torque.properties?rev=332796&r1=332795&r2=332796&view=diff
==============================================================================
--- db/torque/test/trunk/profile/derby/Torque.properties (original)
+++ db/torque/test/trunk/profile/derby/Torque.properties Sat Nov 12 08:20:10 2005
@@ -23,8 +23,8 @@
 
 #Using commons-dbcp
 torque.dsfactory.bookstore.factory = org.apache.torque.dsfactory.SharedPoolDataSourceFactory
-torque.dsfactory.bookstore.connection.driver = com.ibm.db2.jcc.DB2Driver
-torque.dsfactory.bookstore.connection.url = jdbc:derby:net://localhost/test
+torque.dsfactory.bookstore.connection.driver = org.apache.derby.jdbc.EmbeddedDriver
+torque.dsfactory.bookstore.connection.url = jdbc:derby:bookstore
 torque.dsfactory.bookstore.connection.user = test
 torque.dsfactory.bookstore.connection.password = test
 

Modified: db/torque/test/trunk/profile/derby/project.properties
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/profile/derby/project.properties?rev=332796&r1=332795&r2=332796&view=diff
==============================================================================
--- db/torque/test/trunk/profile/derby/project.properties (original)
+++ db/torque/test/trunk/profile/derby/project.properties Sat Nov 12 08:20:10 2005
@@ -22,16 +22,16 @@
 torque.test.base.idMethod = idbroker
 
 #settings that will go straight through to the generator
-torque.database.createUrl = jdbc:derby:net://localhost/test
-torque.database.buildUrl = jdbc:derby:net://localhost/test
+torque.database.createUrl = jdbc:derby:bookstore
+torque.database.buildUrl = jdbc:derby:bookstore
 torque.generateBeans = true
 
 #settings for both generator and runtime
 torque.database = derby
-torque.database.driver = com.ibm.db2.jcc.DB2Driver
+torque.database.driver = org.apache.derby.jdbc.EmbeddedDriver
 torque.database.user = test
 torque.database.password = test
 
 #settings for runtime
-torque.database.url = jdbc:derby:net://localhost/test
+torque.database.url = jdbc:derby:bookstore
 torque.database.validationQuery = values(1)

Modified: db/torque/test/trunk/profile/derby/project.xml
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/profile/derby/project.xml?rev=332796&r1=332795&r2=332796&view=diff
==============================================================================
--- db/torque/test/trunk/profile/derby/project.xml (original)
+++ db/torque/test/trunk/profile/derby/project.xml Sat Nov 12 08:20:10 2005
@@ -27,9 +27,9 @@
   <name>Torque-derby-test</name>
   <dependencies>
     <dependency>
-      <artifactId>db2jcc-licensed</artifactId>
+      <artifactId>derby</artifactId>
       <groupId>derby</groupId>
-      <version>10.0.2.1</version>
+      <version>10.1.1.0</version>
     </dependency> 
   </dependencies>
 </project>

Modified: db/torque/test/trunk/test-project/src/java/org/apache/torque/DataTest.java
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/test-project/src/java/org/apache/torque/DataTest.java?rev=332796&r1=332795&r2=332796&view=diff
==============================================================================
--- db/torque/test/trunk/test-project/src/java/org/apache/torque/DataTest.java (original)
+++ db/torque/test/trunk/test-project/src/java/org/apache/torque/DataTest.java Sat Nov 12
08:20:10 2005
@@ -28,6 +28,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.torque.adapter.DBDerby;
 import org.apache.torque.adapter.DBHypersonicSQL;
 import org.apache.torque.adapter.DBOracle;
 import org.apache.torque.om.StringKey;
@@ -48,10 +49,12 @@
 import org.apache.torque.test.DateTest;
 import org.apache.torque.test.DateTestPeer;
 import org.apache.torque.test.IntegerPk;
+import org.apache.torque.test.IntegerPkPeer;
 import org.apache.torque.test.LargePk;
 import org.apache.torque.test.LargePkPeer;
 import org.apache.torque.test.MultiPk;
 import org.apache.torque.test.MultiPkForeignKey;
+import org.apache.torque.test.MultiPkForeignKeyPeer;
 import org.apache.torque.test.MultiPkPeer;
 import org.apache.torque.test.NullValueTable;
 import org.apache.torque.util.BasePeer;
@@ -272,9 +275,11 @@
      */
     public void testBitType() throws Exception
     {
-        if (Torque.getDB(Torque.getDefaultDB()) instanceof DBOracle)
+        if (Torque.getDB(Torque.getDefaultDB()) instanceof DBOracle
+        		|| Torque.getDB(Torque.getDefaultDB()) instanceof DBDerby)
         {
-            log.error("testBitType(): BIT is known not to work with Oracle");
+            log.error("testBitType(): "
+            		+ "BIT is known not to work with Oracle and Derby");
             // failing is "expected", so exit without error
             return;
         }
@@ -998,6 +1003,14 @@
      */
     public void testMultiplePrimaryForeignKey() throws Exception
     {
+        // clean IntegerPk and MultiPkForeignKey table
+        Criteria criteria = new Criteria();
+        criteria.add(MultiPkForeignKeyPeer.ID, (Integer) null, Criteria.NOT_EQUAL);
+        MultiPkForeignKeyPeer.doDelete(criteria);
+        criteria = new Criteria();
+        criteria.add(IntegerPkPeer.ID, (Integer) null, Criteria.NOT_EQUAL);
+        IntegerPkPeer.doDelete(criteria);
+
         IntegerPk integerPk = new IntegerPk();
         integerPk.save();
         MultiPkForeignKey multiPkForeignKey = new MultiPkForeignKey();



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message