[DBIx-Class-Devel] UPDATE RETURNING

fREW Schmidt frioux at gmail.com
Mon Jul 15 16:56:20 GMT 2013


Point taken.  I'll see what I can do to make it work for
retrieve_on_update.

On Mon, Jul 15, 2013 at 04:49:48PM +0000, Peter Rabbitson wrote:
> On Mon, Jul 15, 2013 at 11:21:11AM -0500, fREW Schmidt wrote:
> > On Mon, Jul 15, 2013 at 04:00:26PM +0000, Peter Rabbitson wrote:
> > > This is a very contrived use-case (I would simply solve it with batches
> > > wrapped in transactions), and I don't think it warrants a full blown
> > > chunk of the scrace API. You kind-of agree further down.
> >
> > It's hardly contrived, that's actually how our application works.
> > Note that this code in our codebase is especially hot and deadlocks
> > are srs.  I am actually using raw sql to do what I am proposing
> > and skipping DBIC entirely because fewer DB interactions helps.
>
> Contrived in the sense of "highly specialized". Since you are talking
> generic API design in this thread, I had to point out that while this is
> a problem you had to code around, this is not likely to be a problem
> that many others will need to code around.
>
> In other words this seems like a case where you are already doing the
> right thing - circumventing your ORM and doing the hot part over the raw
> $dbh.
>
> If constructing the SQL seems hard - there probably is something that
> can be done to make it simpler. But wrapping it in something $storage
> understands seems like thre wrong way to go.
>
> My 2c
>
> _______________________________________________
> DBIx-Class-Devel mailing list
> DBIx-Class-Devel at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class-devel

--
fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20130715/79b7638b/attachment.pgp


More information about the DBIx-Class-Devel mailing list