From: Norbert Buchmuller Date: Wed, 2 Sep 2009 02:32:48 +0000 (+0200) Subject: Rewrote 'SQL functions on the lhs' to use the new SQLA literal SQL + bind feature. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a9ee81233ca46588fb723af4b36c88ae9aed5d2a;p=dbsrgits%2FDBIx-Class-Historic.git Rewrote 'SQL functions on the lhs' to use the new SQLA literal SQL + bind feature. --- diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index 98692c5..df12b83 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -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: