[Bast-commits] r3979 - in
branches/DBIx-Class-Schema-Loader/current: .
lib/DBIx/Class/Schema/Loader
ilmari at dev.catalyst.perl.org
ilmari at dev.catalyst.perl.org
Sun Jan 27 08:58:38 GMT 2008
Author: ilmari
Date: 2008-01-27 08:58:38 +0000 (Sun, 27 Jan 2008)
New Revision: 3979
Modified:
branches/DBIx-Class-Schema-Loader/current/Changes
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
Log:
Add support for vendor-specific extra column attributes.
Modified: branches/DBIx-Class-Schema-Loader/current/Changes
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/Changes 2008-01-27 08:54:55 UTC (rev 3978)
+++ branches/DBIx-Class-Schema-Loader/current/Changes 2008-01-27 08:58:38 UTC (rev 3979)
@@ -1,6 +1,7 @@
Revision history for Perl extension DBIx::Class::Schema::Loader
0.04999_01 Not yet released
+ - Add support for vendor-specific extra column attributes.
- Set join_type => 'LEFT OUTER' for nullable foreign keys
(patch from Bernhard Weißhuhn)
- Set is_auto_increment for auto-increment columns (RT #31473)
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm 2008-01-27 08:54:55 UTC (rev 3978)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm 2008-01-27 08:58:38 UTC (rev 3979)
@@ -226,6 +226,10 @@
$column_info{is_auto_increment} = 1;
}
+ if (my $extra = $self->_column_extra_attr($info)) {
+ $column_info{extra} = $extra;
+ }
+
$result{$col_name} = \%column_info;
}
$sth->finish;
@@ -255,6 +259,10 @@
$column_info{is_auto_increment} = 1;
}
+ if (my $extra = $self->_column_extra_attr($table, $columns[$i], $sth, $i)) {
+ $column_info{extra} = $extra;
+ }
+
$result{$columns[$i]} = \%column_info;
}
$sth->finish;
@@ -277,6 +285,9 @@
# auto-incremented
sub _column_is_auto_increment {}
+# Override this in vendor class to return any "extra" column attributes
+sub _column_extra_attr {}
+
=head1 SEE ALSO
L<DBIx::Class::Schema::Loader>
More information about the Bast-commits
mailing list