MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jon Date:July 9 2008 1:52pm
Subject:svn commit - mysqldoc@docsrva: r11140 - trunk/ndbapi
View as plain text  
Author: jstephens
Date: 2008-07-09 15:52:01 +0200 (Wed, 09 Jul 2008)
New Revision: 11140

Log:

NdbScanFilter::cmp() : COND_LIKE, COND_NOTLIKE comparisons support '%'
and '_' pattern metacharacters (Thanks, Frazer!)




Modified:
   trunk/ndbapi/Makefile.depends
   trunk/ndbapi/class-ndbscanfilter.xml


Modified: trunk/ndbapi/Makefile.depends
===================================================================
--- trunk/ndbapi/Makefile.depends	2008-07-09 09:08:29 UTC (rev 11139)
+++ trunk/ndbapi/Makefile.depends	2008-07-09 13:52:01 UTC (rev 11140)
Changed blocks: 3, Lines Added: 4, Lines Deleted: 1; 1410 bytes

@@ -426,7 +426,8 @@
 class_ndbscanfilter_IDMAPS = \
 	../ndbapi/metadata/class-column.idmap \
 	../ndbapi/metadata/class-ndbscanfilter.idmap \
-	../ndbapi/metadata/struct-ndberror.idmap
+	../ndbapi/metadata/struct-ndberror.idmap \
+	../refman-5.1/metadata/functions-core.idmap
 class-ndbscanfilter.validpure: $(class_ndbscanfilter_SOURCES)
 class-ndbscanfilter.titles: $(class_ndbscanfilter_SOURCES)
 class-ndbscanfilter.useless: $(class_ndbscanfilter_SOURCES)

@@ -798,6 +799,7 @@
 	../refman-5.1/metadata/apis-c.idmap \
 	../refman-5.1/metadata/data-types.idmap \
 	../refman-5.1/metadata/errors-problems-core.idmap \
+	../refman-5.1/metadata/functions-core.idmap \
 	../refman-5.1/metadata/mysql-cluster-disk-data.idmap \
 	../refman-5.1/metadata/partitioning.idmap \
 	../refman-5.1/metadata/sql-syntax.idmap

@@ -1112,6 +1114,7 @@
 	../refman-5.1/metadata/apis-c.idmap \
 	../refman-5.1/metadata/data-types.idmap \
 	../refman-5.1/metadata/errors-problems-core.idmap \
+	../refman-5.1/metadata/functions-core.idmap \
 	../refman-5.1/metadata/mysql-cluster-backup.idmap \
 	../refman-5.1/metadata/mysql-cluster-configuration.idmap \
 	../refman-5.1/metadata/mysql-cluster-disk-data.idmap \


Modified: trunk/ndbapi/class-ndbscanfilter.xml
===================================================================
--- trunk/ndbapi/class-ndbscanfilter.xml	2008-07-09 09:08:29 UTC (rev 11139)
+++ trunk/ndbapi/class-ndbscanfilter.xml	2008-07-09 13:52:01 UTC (rev 11140)
Changed blocks: 4, Lines Added: 65, Lines Deleted: 1; 3856 bytes

@@ -250,7 +250,8 @@
         <para>
           This type represents a condition based on the comparison of a
           column value with some integer value &mdash; that is, a bound
-          condition.
+          condition. A value of this type is used as the first argument
+          to <literal>NdbScanFilter::cmp()</literal>.
         </para>
 
       </formalpara>

@@ -310,6 +311,14 @@
 
       </formalpara>
 
+      <para>
+        Strings compared using <literal>COND_LIKE</literal> and
+        <literal>COND_NOTLIKE</literal> can use the pattern
+        metacharacters <literal>%</literal> and <literal>_</literal>.
+        See <xref linkend="class-ndbscanfilter-cmp"/>, for more
+        information.
+      </para>
+
     </section>
 
     <section id="class-ndbscanfilter-group">

@@ -859,6 +868,13 @@
                 values and the relations that they represent, see
                 <xref linkend="class-ndbscanfilter-binarycondition"/>.
               </para>
+
+              <para>
+                The <replaceable>condition</replaceable> values
+                <literal>COND_LIKE</literal> or
+                <literal>COND_NOTLIKE</literal> are used to compare a
+                column value with a string pattern.
+              </para>
             </listitem>
 
             <listitem>

@@ -877,6 +893,54 @@
                 compared, repesented as a pointer to
                 <literal>void</literal>.
               </para>
+
+              <para>
+                Using using a <literal>COND_LIKE</literal> or
+                <literal>COND_NOTLIKE</literal> comparison condition,
+                the <replaceable>value</replaceable> is treated as a
+                string pattern which can include the pattern
+                metacharacters or <quote>wildcard</quote> characters
+                <literal>%</literal> and <literal>_</literal>, which
+                have the meanings shown here:
+
+                <informaltable>
+                  <tgroup cols="2">
+                    <colspec colwidth="20*"/>
+                    <colspec colwidth="80*"/>
+                    <tbody>
+                      <row>
+                        <entry><emphasis role="bold">Metacharacter</emphasis></entry>
+                        <entry><emphasis role="bold">Description</emphasis></entry>
+                      </row>
+                      <row>
+                        <entry><literal>%</literal></entry>
+                        <entry>Matches zero or more characters</entry>
+                      </row>
+                      <row>
+                        <entry><literal>_</literal></entry>
+                        <entry>Matches exactly one character</entry>
+                      </row>
+                    </tbody>
+                  </tgroup>
+                </informaltable>
+
+                To match against a literal <quote>%</quote> or
+                <quote>_</quote> character, use the backslash
+                (<literal>\</literal>) as an escape character. To match
+                a literal <quote>\</quote> character, use
+                <literal>\\</literal>.
+
+                <note>
+                  <para>
+                    These are the same wildcard characters that are
+                    supported by the SQL <literal>LIKE</literal> and
+                    <literal>NOT LIKE</literal> operators, and are
+                    interpreted in the same way. See
+                    <xref linkend="string-comparison-functions"/>, for
+                    more information.
+                  </para>
+                </note>
+              </para>
             </listitem>
 
             <listitem>


Thread
svn commit - mysqldoc@docsrva: r11140 - trunk/ndbapijon9 Jul