[Dbix-class] SQLA refactor: proposal
Les Fletcher
les at affinitycircles.com
Thu Nov 22 00:09:04 GMT 2007
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.
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?
Is/would there interest in either of these project to the greater
DBIx::Class community?
Les
Matt S Trout wrote:
> Far, far too much of the code is currently in _recurse_where, and the DWIM
> AST provides quite a few ways to say the same thing. From a few hours'
> thought, I think dduncan's
>
> http://search.cpan.org/~duncand/Language-MuldisD-0.9.1/lib/Language/MuldisD/Core.pod
>
> provides most of what we'll need - certainly the SELECT list, simple FROM
> and WHERE stuff is covered.
>
> There are a few SQL-y operators such as LIKE or BETWEEN that don't seem to
> be in there, but I don't see why they can't be in sqla.Core.Str.Between
> etc.
>
> So I think the first stage is to create an SQL::Abstract::Parser that
> parses SQLA syntax into MuldisD (+extra sqla. definitions) and an
> SQL::Abstract::Producer::SQL that converts from MuldisD to SQL, and then
> make core SQL::Abstract use that and pass all tests.
>
> Thoughts?
>
>
More information about the DBIx-Class
mailing list