incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1130148 - /incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceHSQLDB.java
Date Wed, 01 Jun 2011 13:32:05 GMT
Author: kwright
Date: Wed Jun  1 13:32:05 2011
New Revision: 1130148

URL: http://svn.apache.org/viewvc?rev=1130148&view=rev
Log:
Get HSQLDB regular expressions working

Modified:
    incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceHSQLDB.java

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceHSQLDB.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceHSQLDB.java?rev=1130148&r1=1130147&r2=1130148&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceHSQLDB.java
(original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceHSQLDB.java
Wed Jun  1 13:32:05 2011
@@ -838,7 +838,7 @@ public class DBInterfaceHSQLDB extends D
   */
   public String constructRegexpClause(String column, String regularExpression, boolean caseInsensitive)
   {
-    return "REGEXP_MATCHES("+column+","+regularExpression+")";
+    return "REGEXP_MATCHES(CAST("+column+" AS VARCHAR(4096)),"+regularExpression+")";
   }
 
   /** Construct a regular-expression substring clause.
@@ -851,8 +851,7 @@ public class DBInterfaceHSQLDB extends D
   */
   public String constructSubstringClause(String column, String regularExpression, boolean
caseInsensitive)
   {
-    // MHL
-    return "''";
+    return "REGEXP_SUBSTRING(CAST("+column+" AS VARCHAR(4096)),"+regularExpression+")";
   }
 
   /** Construct an offset/limit clause.



Mime
View raw message