[Dbix-class] Saving INSERTs without inserting
Bill Moseley
moseley at hank.org
Wed Oct 21 14:59:35 GMT 2015
I have a test script that generates a large number of inserts. What I'd
like to do is capture the SQL inserts into a file so I can later run the
inserts using psql -f foo.sql or psql's \i command.
I thought I might get lucky and call ->new_result( \%cols )->as_query, but
no.
I know I can create a debug object and capture on ->query_start calls.
But, I'd like to *not* actually insert into the database.
I suppose I could die in the query_start method and eval every insert.
Any other ideas how to capture the insert SQL without actually inserting?
--
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20151021/0251f358/attachment.htm>
More information about the DBIx-Class
mailing list