FAQ

On Tue, Jan 26, 2010 at 10:42 PM, Peter Rabbitson <rabbit+dbic@rabbit.uswrote:

Drew Taylor wrote:
I'm not a DBIC expert, but I don't think so. The [...] construct creates
an arrayref, so the leading '\' would just create a reference to a
reference which is probably NOT what you want. :-) Perhaps you're
thinking about passing a scalar ref to put raw SQL into the query, ie.
\"some sql"?
This is exactly what you want. Please refer to the fine docs of
SQL::Abstract.
In short:

to supply a string of raw sql:

\$sql

to supply a string of raw sql bundled with bind values for placeholders:

\[ $sql, @list_of_bindvals ]
Thanks for clearing that up! I've never used the second version, so now I've
learned something new. :-)

Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100126/b9814196/attachment.htm

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 14 of 16 | next ›
Discussion Overview
groupdbix-class @
categoriesperl, catalyst
postedJan 23, '10 at 9:28p
activeJan 27, '10 at 9:50a
posts16
users11
websitedbix-class.org
irc#dbix-class

People

Translate

site design / logo © 2022 Grokbase