Re: storage layer Re: [PEAR-DEV] Package proposal

From: Date: Thu, 30 Jun 2005 15:22:33 +0000
Subject: Re: storage layer Re: [PEAR-DEV] Package proposal
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-38398@lists.php.net to get a copy of this message
Ian P. Christian wrote:
On Thursday 30 June 2005 14:16, Lukas Smith wrote:
well these issues remind me of the challenges we faced in LiveUser to some extend. although the needs here are much simpler than in liveuser. i have designed a storage layer for liveuser_admin [1][2] that in theory should work with other storage layers, however currently its only implemented for sql rdbms.
What's the thoughts on a package along the lines of 'Storage_Simple'. A persistant storage container with multiple backends. It should not handle relational data, but could handle XML, CSV, raw PHP data (serialized probably), berkley db... whatever.
the layer i have written can actually also join two tables (or better collections of tuples to sound more generic). however stuff like this can be developed one by one. i am entirely open to breaking out the LiveUser_Admin_Storage family of classes in order to facilitate the addition of new backends. i am also entirely open to logical BC breaks.
I've put all of about 60 seconds thought into this: $options = array('uri' => 'xml:///root/moo.xml'); $storage = new Storage_Simple($options); $storage->get('field'); $storage->set('field', 'value');
the LiveUser_Admin storage layer essentially handles inserts, updates, deletes and selects. all but the inserts can handle fairly complex filtering (but the filters can only be AND'ed .. more complex stuff should be able to fit into the code). getting basic non join support working for xml, cvs, arrays should be a job for a few hours at most .. i recently did a blog post on the select parameters: http://blog.backendmedia.com/blog/__/__/_MAIN_/mode/thread_show/thread_id/233 regards, Lukas

« previous php.pear.dev (#38398) next »