db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r472292 - /db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java
Date Tue, 07 Nov 2006 21:53:12 GMT
Author: tfischer
Date: Tue Nov  7 13:53:11 2006
New Revision: 472292

URL: http://svn.apache.org/viewvc?view=rev&rev=472292
Log:
Set escapeText to false and useEscapeClauseInLike to true for the Derby DB adapter.
With these settings, the test project passes.

Modified:
    db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java

Modified: db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBDerby.java?view=diff&rev=472292&r1=472291&r2=472292
==============================================================================
--- 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 Tue Nov  7 13:53:11
2006
@@ -114,4 +114,35 @@
             throws SQLException
     {
     }
+
+    /**
+     * Whether backslashes (\) should be escaped in explicit SQL strings.
+     * If true is returned, a BACKSLASH will be changed to "\\". If false 
+     * is returned, a BACKSLASH will be left as "\".
+     * 
+     * As derby does not need escaping of Backslashes, this method always
+     * returns false.
+     *
+     * @return true if the database needs to escape backslashes
+     *         in SqlExpressions.
+     */
+
+     public boolean escapeText()
+     {
+         return false;
+     }
+
+     /**
+     * Whether an escape clause in like should be used.
+     * Example : select * from AUTHOR where AUTHOR.NAME like '\_%' ESCAPE '\';
+     * 
+     * Derby needs this, so this implementation always returns
+     * <code>true</code>.
+     * 
+     * @return whether the escape clause should be appended or not. 
+     */
+    public boolean useEscapeClauseForLike()
+    {
+        return true;
+    }
 }



---------------------------------------------------------------------
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