From: Karen Etheridge Date: Mon, 28 Jul 2014 19:13:30 +0000 (-0700) Subject: show more ways to include literal bind values X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=83d2991997f6070366d3d2bcd3f1bcc07562b930;p=dbsrgits%2FDBIx-Class-Historic.git show more ways to include literal bind values --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 2c831b1..c799da7 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -3991,12 +3991,19 @@ is the same as select => [qw/foo baz/], as => [qw/foo bar/] -Like elsewhere, literal SQL or literal values can be included by -using a scalar reference, and these values will be available in the result -with C: +Like elsewhere, literal SQL or literal values can be included by using a +scalar reference or a literal bind value, and these values will be available +in the result with C (see also +L): # equivalent SQL: SELECT 1, 'a string', IF(x,1,2) ... - columns => [ { foo => \1, bar => \q{'a string'}, baz => \'IF(x,1,2)' } ] + columns => [ + { + foo => \1, + bar => \q{'a string'}, + baz => \[ '?', 'IF(x,1,2)' ], + } + ] =head2 +columns