Rewrote 'SQL functions on the lhs' to use the new SQLA literal SQL + bind feature.
Norbert Buchmuller [Wed, 2 Sep 2009 02:32:48 +0000 (04:32 +0200)]
lib/DBIx/Class/Manual/FAQ.pod

index 98692c5..df12b83 100644 (file)
@@ -247,16 +247,7 @@ documentation for details.
 
 To use an SQL function on the left hand side of a comparison:
 
- ->search({}, { where => \'YEAR(date_of_birth)=1979' });
-
-=begin hidden
-
-(When the bind arg ordering bug is fixed, the previous example can be
-replaced with the following.)
-
- ->search({}, { where => \'YEAR(date_of_birth)=?', bind => [ 1979 ] });
-
-=end hidden
+ ->search({ -nest => \[ 'YEAR(date_of_birth)', [ dummy => 1979 ] ] });
 
 Or, if you have quoting off: