X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FFAQ.pod;h=6d35ae6bbfccb0215f5049b8adccfe9a384e9e72;hb=974fe5e894412569f1252a95cf62612fef5f687d;hp=98692c5a9aa9ff6885442d7eeedb18211a585202;hpb=f6a14bd4c44420c2e4b2f6d2467cd59e2f28e2d3;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index 98692c5..6d35ae6 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -247,16 +247,13 @@ documentation for details. To use an SQL function on the left hand side of a comparison: - ->search({}, { where => \'YEAR(date_of_birth)=1979' }); + ->search({ -nest => \[ 'YEAR(date_of_birth) = ?', [ plain_value => 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 +Note: the C string in the C<< [ plain_value => 1979 ] >> part +should be either the same as the name of the column (do this if the type of the +return value of the function is the same as the type of the column) or +otherwise it's essentially a dummy string currently (use C as a +habit). It is used by L to handle special column types. Or, if you have quoting off: @@ -374,6 +371,9 @@ C supplied with C. =item .. insert many rows of data efficiently? +The C method in L provides +efficient bulk inserts. + =item .. update a collection of rows at the same time? Create a resultset using a search, to filter the rows of data you