[Dbix-class] might_have support added, relationships refactored, happy birthday

Matt S Trout dbix-class at trout.me.uk
Wed Aug 3 15:53:05 CEST 2005


On Tue, Aug 02, 2005 at 05:54:56PM -0400, Michael Alan Dorman wrote:
> Matt S Trout <dbix-class at trout.me.uk> writes:
> > I'm aware that lots of you really, really need sequences but going
> > back to IANADBA I don't actually have anything except MySQL and
> > SQLite handy to test against.
> >
> > A couple failing tests and a connection to a postgres db would be
> > enough for me to do it, or maybe one of you lot fancies having a go?
> 
> Recent (> 1.38) versions of the DBI include the ->last_insert_id
> method; wouldn't it make sense to build DBIx::Class's functionality on
> this base and do away with driver-specific code if at all possible?
> 
> It seems better to support the standard than not, assuming there
> aren't caveats about breadth of support or performance...

It's not so much "breadth of support" as "supported at all". I actually
tried using that method, and if you look in the source the DBIx::Class
method that does it is called _last_insert_id in honour of it. But it
(a) takes different parameters depending on the driver and (b) doesn't
seem to be supported a lot of places yet.

If you can get it to work against a database well enough to test it (I tried
briefly but not that hard) I'd very much appreciate a patch - but we'll
probably end up needing driver-specific plugins to pass the damn
arguments.

Note: It could easily be that I was just doing something stupid, and this
function actually works beautifully. I'd very much prefer that to be the
case, so please do your best to prove me wrong :)

-- 
     Matt S Trout           Website: http://www.shadowcatsystems.co.uk
  Technical Director        E-mail:  mst (at) shadowcatsystems.co.uk
Shadowcat Systems Ltd.



More information about the Dbix-class mailing list