[Dbix-class] RFC: Database capabilities

Mike Rylander mrylander at gmail.com
Thu Mar 30 21:18:44 CEST 2006


On 3/30/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> Paul Makepeace wrote:
> > Je 2006-03-29 13:09:07 +0100, Matt S Trout skribis:
> >> What things *haven't* you been able to get DBIC to do with your database that
> >> you'd like to be able to? The main things I'd kill for are -
> >
> > I know I sound like I'm droning on about this but...
> >
> > I'd like to be able to talk to DBIC in SQL rather than its own dialect
> > of perl data structures. I'm thinking an SQL parser that generated DBIC
> > code. (A consequence of this is abstracting some of the RDMBS dialect
> > differences away *at the SQL level*.)
>
> Hmm, wonder if we can do an "explicit S::Abstract tree <-> SQL statement"
> relationship such that we can convert losslessly both ways? If we can, can we
> encapsulate the relationship <-> ON clause stuff to achieve the same thing?
> That'd be really kinda nice, esp. since we could then specify the production
> for stuff like LDAPQuery and SPARQL as well when we look at other storages. Is
> this feasible even for SQL? (I Am Not A Parser Expert)

Parts of SQL::Statement (specifically SQL::Parser) seem to do exactly
that for SQL, and can be extended via subclassing or (interpreted) SQL
commands.

http://search.cpan.org/~jzucker/SQL-Statement-1.15/lib/SQL/Statement/Syntax.pod

--
Mike Rylander
mrylander at gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org



More information about the Dbix-class mailing list