[Dbix-class] [PATCH] Add support for 'INSERT ... RETURNING' to SQL::Abstract

Oliver Charles oliver.g.charles at googlemail.com
Sun Jan 10 19:48:24 GMT 2010


This was original part of my SQL::Abstract::Plugin::InsertReturning
[1] module, but mst expressed interest in having this become part of
core. So here it is!

This adds an extra parameter to SQL::Abstract->insert, \%options,
which can take additional options to generate the query. At the moment
this obviously only supports the 'returning' option. I've added
documentation about how this option is used, along with some tests to
ensure correctness.

I hope this helps, I'm open to feedback if it needs to be improved.

-- =

    Oliver Charles / aCiD2

1: http://search.cpan.org/~cycles/SQL-Abstract-Plugin-InsertReturning/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insert-returning.patch
Type: application/octet-stream
Size: 3614 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100110/65=
81f7a8/insert-returning.obj


More information about the DBIx-Class mailing list