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

Oliver Charles oliver.g.charles at googlemail.com
Mon Jan 11 11:09:26 GMT 2010


Hi Peter,

On Mon, Jan 11, 2010 at 10:24 AM, Peter Rabbitson <rabbit+dbic at rabbit.us> w=
rote:
> Hi, nice work. There is a slight problem with how you are treating a
> single scalar. In SQLA the general prinicple is that if you want to
> pass random strings, you pass \'...stuff...' (scalarref). Anything
> else is subject to quoting (which you do not test). So for example
> I would expect returning =3D> 'id, foo, bar' } to generate
> ... =A0RETURNING "id, foo, bar"
> when quoting is engaged. Please augment the tests and introduce
> scalarref handling (scalar should be treated as 1-element arrayref)
>
> Also if you prefer to work on a branch I or mst can set you up with
> a commit bit to the repo. Drop either one of us a line in #dbix-class

Thanks for the feedback, I've included a patch which I think addresses
these problems.

No need for a branch, this is only small stuff :)

-- =

    Oliver Charles / aCiD2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insert-returning.patch
Type: application/octet-stream
Size: 4790 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100111/e2=
28478b/insert-returning.obj


More information about the DBIx-Class mailing list