On 12/29/06 8:57 PM, Jonathan Vanasco wrote:
> On Dec 29, 2006, at 7:53 PM, John Siracusa wrote:
>> If you jut want the value of now() in isolation, plain DBI is the  way to go.
>> (Wrap the code in a function or class method somewhere to hide the  gory DBI
>> details.)
>> 
> the problem I see is that you can run into issues where NOW() is  transaction
> specific -- like in Postgres

That's not a problem, so long as you do what you have to do anyway: share a
single db connection among all pieces of code within a particular
transaction.  The function or class method to get the current value of now()
should take a db or $dbh argument to allow this.

> you could also try creating a new rose::db::object class of sql
> helper items with 'result' as the only column-- then give it a
> manager class and have functions select your 'result' into the
> 'result' field.

It's pretty easy to make a degenerate RDBO class and Manager to do this kind
of thing, but it seems pretty "unclean" to me, and not worthwhile.

-John



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to