The following little fragment of sql does what I'd like it to do,
inserts the current timestamp into the created_date column.

  create table mooses (
        id integer primary key autoincrement,
        name text,
        created_date datetime not null default current_timestamp
  );
  insert into mooses(name) values ('B. Moose');
  insert into mooses(name) values ('Big Tex');
  select * from mooses;

If I use Rose::DB::Object::Loader on the database created with the
above, it complains with:

   insert() - Invalid default datetime: 'current_timestamp' at ... Object.pm

If I change Rose::DB::SQLite::validate_datetime_keyword so that it'll
accept 'current_timestamp' then the value gets inserted literally into
the table.

I'd like to be able to specify the default behaviour in the schema,
it'll be more robust if/when it's used outside of rdbo.

Is there a proper way to make this work?

g.

-------------------------------------------------------------------------
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

Reply via email to