From: Rafael Kitover Date: Sun, 31 Jan 2010 12:39:32 +0000 (+0000) Subject: add POD about computed columns and timestamps for Sybase X-Git-Tag: v0.08116~13^2~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6476fd66adcf535fb09e0bc2e7a0cf7630609262;p=dbsrgits%2FDBIx-Class.git add POD about computed columns and timestamps for Sybase --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm b/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm index d7bf678..53465ee 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm @@ -1102,6 +1102,42 @@ loading your app, if it doesn't match the character set of your database. When inserting IMAGE columns using this method, you'll need to use L as well. +=head1 COMPUTED COLUMNS + +If you have columns such as: + + created_dtm AS getdate() + +represent them in your Result classes as: + + created_dtm => { + data_type => undef, + default_value => \'getdate()', + is_nullable => 0, + } + +The C must exist and must be C. Then empty inserts will work +on tables with such columns. + +=head1 TIMESTAMP COLUMNS + +C columns in Sybase ASE are not really timestamps, see: +L. + +They should be defined in your Result classes as: + + ts => { + data_type => 'timestamp', + is_nullable => 0, + inflate_datetime => 0, + } + +The C< 0>> is necessary if you use +L, and most people do, and still want to +be able to read these values. + +The values will come back as hexadecimal. + =head1 TODO =over