Author: tfischer
Date: Wed Nov 15 13:02:50 2006
New Revision: 475418
URL: http://svn.apache.org/viewvc?view=rev&rev=475418
Log:
Corrected the escaping settings for the HSQLDB and MS-SQL adapters
Modified:
db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBHypersonicSQL.java
db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBMSSQL.java
Modified:
db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBHypersonicSQL.java
URL:
http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBHypersonicSQL.java?view=diff&rev=475418&r1=475417&r2=475418
==============================================================================
---
db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBHypersonicSQL.java
(original)
+++
db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBHypersonicSQL.java
Wed Nov 15 13:02:50 2006
@@ -115,4 +115,30 @@
public void unlockTable(Connection con, String table) throws SQLException
{
}
+
+ /**
+ * This method is for the SqlExpression.quoteAndEscape rules. The rule is,
+ * any string in a SqlExpression with a BACKSLASH will either be changed to
+ * "\\" or left as "\".
+ *
+ * @return false.
+ */
+ public boolean escapeText()
+ {
+ return false;
+ }
+
+ /**
+ * Whether an escape clause in like should be used.
+ * Example : select * from AUTHOR where AUTHOR.NAME like '\_%' ESCAPE '\';
+ *
+ * HSQLDB 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;
+ }
}
Modified:
db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBMSSQL.java
URL:
http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBMSSQL.java?view=diff&rev=475418&r1=475417&r2=475418
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBMSSQL.java
(original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBMSSQL.java Wed
Nov 15 13:02:50 2006
@@ -43,19 +43,4 @@
protected DBMSSQL()
{
}
-
- /**
- * Whether an escape clause in like should be used.
- * Example : select * from AUTHOR where AUTHOR.NAME like '\_%' ESCAPE '\';
- *
- * TODO: check the following:
- * MS-SQL does not need this, so this implementation always returns
- * <code>false</code>.
- *
- * @return whether the escape clause should be appended or not.
- */
- public boolean useEscapeClauseForLike()
- {
- return false;
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]