[Bast-commits] r5854 - SQL-Abstract/1.x/trunk/lib/SQL

dami at dev.catalyst.perl.org dami at dev.catalyst.perl.org
Wed Apr 1 10:06:17 BST 2009


Author: dami
Date: 2009-04-01 10:06:17 +0100 (Wed, 01 Apr 2009)
New Revision: 5854

Modified:
   SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
Log:
corrections/additions in POD, after remarks from ribasushi

Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm	2009-03-31 22:18:37 UTC (rev 5853)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm	2009-04-01 09:06:17 UTC (rev 5854)
@@ -1320,7 +1320,9 @@
 =item sqltrue, sqlfalse
 
 Expressions for inserting boolean values within SQL statements.
-By default these are C<1=1> and C<1=0>.
+By default these are C<1=1> and C<1=0>. They are used
+by the special operators C<-in> and C<-not_in> for generating
+correct SQL even when the argument is an empty array (see below).
 
 =item logic
 
@@ -1639,7 +1641,7 @@
 A field associated to an empty arrayref will be considered a 
 logical false and will generate 0=1.
 
-=head2 Key-value pairs
+=head2 Specific comparison operators
 
 If you want to specify a different type of operator for your comparison,
 you can use a hashref for a given column:
@@ -1766,6 +1768,12 @@
 The reverse operator C<-not_in> generates SQL C<NOT IN> and is used in 
 the same way.
 
+If the argument to C<-in> is an empty array, 'sqlfalse' is generated
+(by default : C<1=0>). Similarly, C<< -not_in => [] >> generates
+'sqltrue' (by default : C<1=1>).
+
+
+
 Another pair of operators is C<-between> and C<-not_between>, 
 used with an arrayref of two values:
 




More information about the Bast-commits mailing list