On Sat, 5 Aug 2006, Dan Horne wrote:

> On Behalf Of Mark Hedges
>> Sent: Saturday, 5 August 2006 10:54 a.m.
>> To: [email protected]
>> Subject: [Dbix-class] patch for InflateColumn::DateTime
>>
>>
>> Hi,
>>
>> I could not create an object and set the date field to \q{ NOW() }.
>>
>> deflate->() should not do anything if the value is a scalar ref,
>> but should pass it through as-is so it gets turned into raw SQL.
>>
>
> On a related note I wonder what people think about a db-generic version of
> "now()" which would be replaced with "now" or "sysdate" or whatever the
> db-specific implementation should be. It means that you wouldn't need to
> create a DateTime object in advance just to get the current date for your
> record.
>

Sounds like  a great idea to me! Ideally each Storage::DBI::Foo should be 
able to return the value it likes in a simple call, and funky magic in the 
SQL creation replaces it where appropriate..

Sort out DEFAULT vs NULL while you're at it? ;)

Jess


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to