[Dbix-class] Get generated SQL
Ash Berlin
ash_cpan at firemirror.com
Tue Mar 11 17:52:13 GMT 2008
On 11 Mar 2008, at 16:39, Matt Lawrence wrote:
> I found some time last night to work on this. I put the tests in a
> new file t/as_sql.t, they are pretty basic: just calling each new
> method once and checking the output is as expected
>
> There are now 2 cursor methods that are proxied from the resultset:
> as_sql and as_static_sql.
>
> as_sql leaves placeholders in the sql string and passes back the raw
> values that go into it, as_static_sql replaces the placeholders
> using the quote method from DBI, with optional data type mapping via
> arguments (either name-based or positional). This seems to me to be
> an acceptable compromise between fully-automatic data_type mapping
> (which seems at first glance to be non-trivial and usually
> unnecessary) and total disregard of data_type (which will bite Pg
> bytea columns et al)
>
> Comments?
>
> Matt
Yes - where's the code?
More information about the DBIx-Class
mailing list