empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franci...@apache.org
Subject svn commit: r797897 - /incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
Date Sun, 26 Jul 2009 10:07:01 GMT
Author: francisdb
Date: Sun Jul 26 10:07:00 2009
New Revision: 797897

URL: http://svn.apache.org/viewvc?rev=797897&view=rev
Log:
EMPIREDB-41
reverse function for postgresql
tested and fixed the previous patch

Modified:
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java?rev=797897&r1=797896&r2=797897&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
Sun Jul 26 10:07:00 2009
@@ -58,7 +58,7 @@
         "CREATE OR REPLACE FUNCTION reverse(TEXT) RETURNS TEXT AS '\n" +
         "DECLARE\n" +
         "   original ALIAS FOR $1;\n" +
-        "   reversed TEXT := \'\';\n" +
+        "   reversed TEXT := \\'\\';\n" +
         "   onechar  VARCHAR;\n" +
         "   mypos    INTEGER;\n" +
         "BEGIN\n" +
@@ -223,12 +223,12 @@
     
     /**
      * Creates the reverse function in postgre sql that returns the reverse of a string value.
-     * The reverse function may be helpful in SQL to analyse a text field from its end.
+     * The reverse function may be helpful in SQL to analyze a text field from its end.
      * This function must be called manually by the application depending on whether it needs
to use this function or not.<br/>
      * The current implementation does not check, whether the reverse function already exists.
      * If the functions exists it will be replaced and true is returned.
      * @param conn a valid database connection
-     * @return true if the reverse function was created sucessfully or false otherwise
+     * @return true if the reverse function was created successfully or false otherwise
      */
     public boolean createReverseFunction(Connection conn)
     {



Mime
View raw message