Revision history for Perl extension DBIx::Class::Schema::Loader
+ - set inflate_datetime => 1 for 'AS getdate()' computed columns in
+ Sybase
- preliminary Firebird support
- use introspection pragmas instead of regexes to introspect SQLite
(hobbs)
if ($default =~ /^AS \s+ (\S+)/ix) {
my $function = $1;
$res->{default_value} = \$function;
+
+ if ($function =~ /^getdate\b/) {
+ $res->{inflate_datetime} = 1;
+ }
}
elsif ($default =~ /^DEFAULT \s+ (\S+)/ix) {
my ($constant_default) = $1 =~ /^['"\[\]]?(.*?)['"\[\]]?\z/;
},
],
drop => [ qw/ sybase_loader_test1 sybase_loader_test2 / ],
- count => 36,
+ count => 37,
run => sub {
my ($schema, $monikers, $classes) = @_;
is_deeply $rsrc->column_info('the_decimal')->{size}, [6,3],
'size for DECIMAL(precision, scale) is correct';
+ is $schema->resultset($monikers->{loader_test35})->result_source->column_info('a_function')->{inflate_datetime}, 1,
+ 'AS getdate() columns get inflate_datetime => 1';
},
},
);