From: Karen Etheridge Date: Mon, 28 Jul 2014 19:02:23 +0000 (-0700) Subject: document including literal SQL and values in a resultset with "columns" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb99e92d8912469ba2477ef3a9360df84e41b3c2;p=dbsrgits%2FDBIx-Class-Historic.git document including literal SQL and values in a resultset with "columns" --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 84a2b13..49a490f 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -3991,6 +3991,13 @@ 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: + + # equivalent SQL: SELECT 1, "a string", IF(x,1,2) ... + columns => [ { foo => \1, bar => \'"a string"', baz => \'IF(x,1,2)' } ] + =head2 +columns =over 4