Tag: cws_src680_kabparam
User: ebischoff
Date: 2006/07/03 00:49:33

Modified:
   dba/connectivity/source/drivers/kab/KStatement.cxx

Log:
 Adding support for "Name LIKE ?" statements

File Changes:

Directory: /dba/connectivity/source/drivers/kab/
================================================

File [changed]: KStatement.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KStatement.cxx?r1=1.3.6.1&r2=1.3.6.2
Delta lines:  +17 -10
---------------------
--- KStatement.cxx      29 Jun 2006 08:15:23 -0000      1.3.6.1
+++ KStatement.cxx      3 Jul 2006 07:49:31 -0000       1.3.6.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: KStatement.cxx,v $
  *
- *  $Revision: 1.3.6.1 $
+ *  $Revision: 1.3.6.2 $
  *
- *  last change: $Author: ebischoff $ $Date: 2006/06/29 08:15:23 $
+ *  last change: $Author: ebischoff $ $Date: 2006/07/03 07:49:31 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -230,17 +230,24 @@
                }
                else if (SQL_ISRULE(pParseNode, like_predicate))
                {
-                       if (SQL_ISRULE(pLeft, column_ref) && 
pMiddleRight->getNodeType() == SQL_NODE_STRING)
+                       if (SQL_ISRULE(pLeft, column_ref))
                        {
                                ::rtl::OUString sColumnName,
-                                               sTableRange,
-                                               sMatchString;
+                                               sTableRange;
 
                                m_aSQLIterator.getColumnRange(pLeft, 
sColumnName, sTableRange);
+
+                               if (pMiddleRight->isToken() || 
SQL_ISRULE(pMiddleRight, parameter))
+                               {
+                                       ::rtl::OUString sMatchString;
+
+                                       if (pMiddleRight->isToken())            
                        // WHERE Name LIKE 'Sm%'
                                sMatchString = pMiddleRight->getTokenValue();
+                                       else if (SQL_ISRULE(pMiddleRight, 
parameter))   // WHERE Name LIKE ?
+                                               getNextParameter(sMatchString);
 
-                               // WHERE Name LIKE 'Sm%'
                                return new KabConditionSimilar(sColumnName, 
sMatchString);
+                               }
                        }
                }
        }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to