Peter Karman wrote:
>
> On 09/23/2007 11:24 AM, Matt S Trout wrote:
>> On Fri, Sep 21, 2007 at 08:57:35AM -0500, Peter
Karman wrote:
>
>>> CXCM subclasses would need to implement at
least the following methods:
>>>
>>> * new_object - returns
CatalystX::CRUD::Object->new()
>>> * fetch - returns
CatalystX::CRUD::Object->new()->read()
>>> * search - returns zero or more CXCO
instances as an arrayref
>>> * interator - like search() but returns an
iterator
>>> * count - like search() but returns an
integer
>> Have you looked at the way the Handel storage stuff
works? That already
>> supports both DBIC and RDBO so might be an
interesting start.
>>
>
> I have looked through it (I had to figure out that
Handel-Storage-RDBO is
> packaged separately...) and it looks like the base
Storage API is much more
> complex and full-featured than what I am suggesting.
But all the methods I
> mention are there in one or another. I'll probably dig
in to the DBIC
> implementation when/if I need help with that part of
CXCM (/me hoping not write
> that all by myself...).
Give me a shout out if you need help deciphering the storage
layer
madness in Handel. Aside from the add/remove
column/constraint/default
values/inflate/deflate magic, it's fairly specific to
cart-ing. Then
again, CRUD is CRUD, even if it's named add_item,
delete_item, update().
even when it's doing CRUD on something that isn't a db, like
XML:
http://search.cpan.org/dis
t/Handel/lib/Handel/Manual/Cookbook/WritingCustomStorage.pod
-=Chris
_______________________________________________
List: Catalyst lists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalyst lists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/
|