On May 22, 2006, at 8:35 PM, John Siracusa wrote:
Sure, but you can make one, right? You've already got the $dbh. Just
make
a new Rose::DB-derived object and shove the $dbh in there :) If you do
this
a lot, you can make a helper function for it:
$db = make_me_a_db_from($dbh);
yeah, but that makes sense.
ok, this should be my last question...
i naturally need to display a set of data that i pulled out of the db ( it
ends up in TAL right now, but I've got an abstracted interface as part of
a custom framework i built )
i run all my stuff under mod_perl and, to conserve on a bunch of
repetitive db queries, i cache about 20k worth of variables that never
change on startup
this is pretty generic 3nf 'crap' tables -- stuff like
table filetype: id | name
table accounttype: id | name
about 10 tables, ~200 id:name pairigs total. bs stuff. using straight
sql in the framework i built though, i learned pre-caching that stuff
saved a visible bit on postgres queries and almost no performance hit in
perl. so i do that.
back to my framework... as I load stuff to / from the db I'd translate ids
to names and vice versa. very simple. that doesn't work well with rosedb,
but no problem - i have a filter step that i use to personalize session
data against info from the DB (without getting deep into why, one project
i have is really db heavy, so i precache a lot of generic queries into
memcached with a 5minute timeout, then personalize the display against
session data. it works really well). in any event, I tried to mangle a
'row' from a result object with some new field names -- no luck
am i correct in assuming that the only way to accomplish what I want to do
( add some new arbitrary fields to a result returned by a load; or
get_magagerclass() ) is to clone the existing fieldnames into a new ,
normal hash?
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object