[Dbix-class] SQLA refactor: proposal

Matt S Trout dbix-class at trout.me.uk
Thu Nov 22 14:52:48 GMT 2007


On Wed, Nov 21, 2007 at 04:09:04PM -0800, Les Fletcher wrote:
> One thing I have been working on recently is a SQL::Abstract::MySQL 
> package to that allows for some MySQL non-standard extensions to be 
> used.  Things like replace, limits on delete, delayed and low priority, 
> and index forcing commands.  (The first iteration has things that my 
> company is interested in making use of.) The idea was that it would be 
> done in such a way that SQL::Abstract could also be sub-classed to 
> support other database vendors (SQL::Abstract::MSSQL or 
> SQL::Abstract::Oracle for example).
>
> I have not yet had a chance to look through Language::MuldisD, but I was 
> wondering where a rework like this would leave such projects.

Having a better, saner way of extending SQL::Abstract to provide this
sort of thing, I'd hope :) - especially since things like REPLACE really
need to be supported all the way through the toolchain and emulated for
databases that don't have an equivalent (e.g. it strikes me that REPLACE is
basically create_or_update, to a great extent).

If you want a commit bit to the refac branch you could dive in and we could
work together to make sure the end result works for you - making SQL dialects
easy to implement (the current SQL::Abstract code isn't IMO particularly
easy to override, and I think as author of most of the DBIC overrides I can
speak with some authority to that :) is a significant part of what we want
to achieve from this refactor.
 
> On a slightly separate note, I have "working" version of the above 
> SQL::Abstract::MySQL and some of the reworking of DBIx::Class required 
> the ability to pass in an attributes hash for insert, create, delete and 
> other such functions.  I am getting some failed test because of it.  Is 
> there any reason why the function that are currently only taking one 
> hash ref (like insert or delete) shouldn't also take a second attribute 
> hash that allows for extensions?

Don't see why not. You fancy putting together a branch off trunk/0.09 and
having a go at implementing it?

-- 
      Matt S Trout       Catalyst and DBIx::Class consulting and support -
   Technical Director      http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Christmas fun in collectable card game form -
                           http://www.shadowcat.co.uk/resources/2007_trading/



More information about the DBIx-Class mailing list