[Dbix-class] RFC: Database capabilities
Matt S Trout
dbix-class at trout.me.uk
Thu Mar 30 20:03:10 CEST 2006
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)
Darren, this is your sort of area - could Rosetta buy us this? Is Rosetta
remotely usable at the moment? Whatever the answers to the previous two
questions, does this sound good or am I on crack again?
> As a fantasy wish-list item, I'd like DBIC to derive the relationships
> and create the various rels without me doing it at all in the class
> definitions. DBIC could then use these relationships in the creation of
> the DBIC perl data structure dialect above.
Schema::Loader and the SQLT producer are both approaches to that. You're
always going to run into some metadata that simply isn't in your database, though.
Personally, I still much prefer having my schema encapsulated once at the DBIC
level and generate the SQL DDL off that. But that's at least partially
personal preference, and we do intend to support both ways as fully as possible.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list