[Dbix-class] Providing unified interface through DBIx::Class

Matt S Trout dbix-class at trout.me.uk
Sun Jul 20 02:29:06 BST 2008


On Tue, Jul 15, 2008 at 05:59:23AM -0700, Andreas Pronakis wrote:
> This question might sound a bit silly as I'm sure that DBIx::Class has the DBI part at the front for a reason, however I thought I'd ask anyway.
> 
> While evaluating DBIx::Class a question was raised by a colleague: "Can we use DBIx::Class to connect to data servers other than a Database e.g. to a service proving data through a port in an X delimited or XML (or …) format?".  Since I am fairly new to DBIC I thought I'd post the question here.
> 
> The aim is to provide a uniformed Interface to developers for accessing data, irrespective of the type of backend he has to talk to, to get the data, all the developer needs to know is that they will get a resultset that they can use the same way as resultset retrieved using a DB.
> 
> So they can still call:
> my $obj = $schema->resultset('CustomResultSet::Object')->find('my_id');
> or use search() (obviously without any joins or other DB related \%attrs but we could provide our own custom ones).
> 
> Is this possible/worth exploring?
> 
> Does anyone know which parts of DBIC would/potentially need to be sub-classed to achieve this?

Should live just as a subclass of DBIx::Class::Storage.

Multiple backends were always planned but I'm not entirely sure how easy
they'll be now, we may have crept more RDBMS-ish stuff in than we meant to.

I've no objection to giving you a branch to experiment with though.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the DBIx-Class mailing list