[Bast-commits] r5496 - in SQL-Abstract/1.x/branches/1.50_RC: . lib/SQL

norbi at dev.catalyst.perl.org norbi at dev.catalyst.perl.org
Tue Feb 17 19:34:50 GMT 2009


Author: norbi
Date: 2009-02-17 19:34:50 +0000 (Tue, 17 Feb 2009)
New Revision: 5496

Modified:
   SQL-Abstract/1.x/branches/1.50_RC/
   SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm
Log:
 r5614 at vger:  mendel | 2009-02-17 20:34:44 +0100
  * Added documentation of the impact of bindtype on \[$sql, @bind].



Property changes on: SQL-Abstract/1.x/branches/1.50_RC
___________________________________________________________________
Name: svk:merge
   - 4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC:5612
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC-extraparens:5308
   + 4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC:5614
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC-extraparens:5308

Modified: SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm	2009-02-17 19:20:53 UTC (rev 5495)
+++ SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm	2009-02-17 19:34:50 UTC (rev 5496)
@@ -1382,6 +1382,10 @@
 sub called C<bind_fields()> or something and reuse it repeatedly. You still
 get a layer of abstraction over manual SQL specification.
 
+Note that if you set L</bindtype> to C<columns>, the C<\[$sql, @bind]>
+construct (see L</Literal SQL with placeholders and bind values (subqueries)>)
+will expect the bind values in this format.
+
 =item quote_char
 
 This is the character that a table or column name will be quoted
@@ -1875,7 +1879,15 @@
     $stmt = "WHERE ( date_column = date '2008-09-30' - ?::integer )"
     @bind = ('10');
 
+Note that you must pass the bind values in the same format as they are returned
+by C</where>. That means that if you set L</bindtype> to C<columns>, you must
+provide the bind values in the C<< [ column_name => value ] >> format, so eg.
+the above example will look like:
 
+    my %where = (
+       date_column => \[q/= date '2008-09-30' - ?::integer/, [ dummy => 10 ]/]
+    )
+
 Literal SQL is especially useful for nesting parenthesized clauses in the
 main SQL query. Here is a first example :
 




More information about the Bast-commits mailing list