[Dbix-class] [PATCH] Add support for 'INSERT ... RETURNING' to
SQL::Abstract
Peter Rabbitson
rabbit+dbic at rabbit.us
Fri Jan 22 11:47:18 GMT 2010
Oliver Charles wrote:
> On Mon, Jan 11, 2010 at 11:09 AM, Oliver Charles
> <oliver.g.charles at googlemail.com> wrote:
>> Hi Peter,
>>
>> On Mon, Jan 11, 2010 at 10:24 AM, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
>>> 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 => 'id, foo, bar' } to generate
>>> ... RETURNING "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 :)
>
> Hi, was this patch OK? I haven't heard anything since submitting it :)
>
Sorry for the delay
Yep, it looks good. It will be included in the next release, there are a
couple other things that turned out to be buglets in SQLA, which will
delay said release. Stay tuned on dbix_class at twitter :)
Cheers
More information about the DBIx-Class
mailing list