Re: [RDBO] object caching functionality
On 4/17/07, Jonathan Vanasco [EMAIL PROTECTED] wrote: Though that can be handled using a strip helper alone too -- we'd just need an unstrip() function that builds back in a db object and metadata I don't think that'd be necessary. The meta and db attributes would re-materialize on demand. We could even serialize the db attribute if we first were sure to clear the DBI dbh it holds. and we'd need to loop each object for the right information to strip or not. What's to loop? Just clearing meta and the dbh would make a nicely serializable object, as far as I can tell. -John - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object
Re: [RDBO] object caching functionality
On Apr 18, 2007, at 10:22 AM, John Siracusa wrote: On 4/17/07, Jonathan Vanasco [EMAIL PROTECTED] wrote: Though that can be handled using a strip helper alone too -- we'd just need an unstrip() function that builds back in a db object and metadata I don't think that'd be necessary. The meta and db attributes would re-materialize on demand. We could even serialize the db attribute if we first were sure to clear the DBI dbh it holds. how? I'm not understanding your full train of thought. The only ways I saw this happening were: a- Strip DB + Meta on serialize. On re-materialize build in new db + meta into the object b- Strip DB + Meta on serialize. On re-materialize transfer object contents to a new rdob.obj and we'd need to loop each object for the right information to strip or not. What's to loop? Just clearing meta and the dbh would make a nicely serializable object, as far as I can tell. well the object meta is all over the place - i'm not sure what functions you use to tell which xrdo_priv meta attributes are set . in my approaches thus far, to strip i'm looping through the object looking for __xrdo prefix // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | SyndiClick.com | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object
Re: [RDBO] object caching functionality
On Apr 18, 2007, at 11:58 AM, John Siracusa wrote: Well, lemme implement it and you can try it and tell me how it works for you. I'll try to get it done this week. fair enough :) I should have the object_tree stuff done by friday/monday. I had to put this stuff off for a few days to deal with regex hell for now // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | SyndiClick.com | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object
Re: [RDBO] dbh caching
On Thu, Apr 12, 2007 at 10:54:36PM -0400, John Siracusa wrote: What about using Ima::DBI? Would that stomp on RDB? I doubt it. A Rose::DB object shouldn't care much what class its dbh is, so long as it acts appropriately like a plain DBI dbh. Sorry, just getting back to this. I'm missing something critical -- or something obvious: This works fine in my base class: sub init_db { our $DBH =|| App::RDB-new } I've got the same $dbh for the life of the program. But, I'd like to try using DBI-connect_cached directly. I first tried returning $dbh directly in the init_db call. That's were I misunderstood your comments, I guess. So, then I tried passing a dbh param to App::RDB-new: sub init_db { ... my $dbh = DBI-connect_cached( @params ); return App::RDB-new( dbh = $dbh ); } Where @params does not change between calls. I then get a new $dbh. for new RDBO objects. So, I'm not seeing how to correctly do this. Thanks, -- Bill Moseley [EMAIL PROTECTED] - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object