I'm just starting to rewrite some old code with RDBO. After my first hour rereading the tutorial and getting some basic stuff written, I hit a fairly significant problem.
I am doing my testing and development with SQLite. My first table has a column that I wanted to use for datetimes. I wanted its default value to be the current time. I tried using the example code from Tutorial.pod: date_created => { type => 'timestamp', not_null => 1, default => 'now()' }, ...but that inserted "now()" into my timestamp column. Oops. Then I tried using the SQLite equivalent of now: datetime('now'). Again, that inserted literal text. Ask, on #rdbo, said that he just used "now" for such things, on MySQL. With little hope, I tried that as the default, and it worked! I can't find this documented, and it seems like a very imporant default to document, given the obnoxious way in which the database-level defaults for datetimes and the like can differ. -- rjbs ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object