[Dbix-class] Providing unified interface through DBIx::Class
Eden Cardim
edencardim at gmail.com
Tue Jul 15 14:57:46 BST 2008
On Tue, Jul 15, 2008 at 9:59 AM, Andreas Pronakis <andr3as at yahoo.com> wrote:
> Is this possible/worth exploring?
>
> Does anyone know which parts of DBIC would/potentially need to be sub-classed to achieve this?
>
> Has anyone attempted something like this before? If so how did they go about it and what was the outcome?
Yes, you need to implement your own storage class and pass it to your
schema via My::Schema->storage_type, which currently defaults to
'::DBI'. You'll need knowledge about how the SQLA syntax tree works,
mimicking DBIx::Class::Storage::DBI should get you started. Good news
is, you won't need to implement the entire spec, just the bits you
need for your app, incrementally. I've sucessfully done this in order
to query the Facebook API, which provides data serialized as JSON.
--
edenc.vox.com
More information about the DBIx-Class
mailing list