use strict;
use warnings;
-use mro 'c3';
use base qw/DBIx::Class::Schema::Loader::DBI/;
+use mro 'c3';
use Carp::Clan qw/^DBIx::Class/;
use List::Util 'first';
-use namespace::clean;
use DBIx::Class::Schema::Loader::Table ();
+use namespace::clean;
-our $VERSION = '0.07010';
+our $VERSION = '0.07047';
sub _supports_db_schema { 0 }
=head1 COLUMN NAME CASE ISSUES
By default column names from unquoted DDL will be generated in lowercase, for
-consistency with other backends.
+consistency with other backends.
Set the L<preserve_case|DBIx::Class::Schema::Loader::Base/preserve_case> option
to true if you would like to have column names in the internal case, which is
);
}
- foreach my $fk (keys %$remote_table) {
+ foreach my $fk (sort keys %$remote_table) {
push @rels, {
local_columns => $local_cols->{$fk},
remote_columns => $remote_cols->{$fk},
push @{$constraints->{$constraint_name}}, $self->_lc($column);
}
- my @uniqs = map { [ $_ => $constraints->{$_} ] } keys %$constraints;
- return \@uniqs;
+ return [ map { [ $_ => $constraints->{$_} ] } sort keys %$constraints ];
}
sub _columns_info_for {
$info->{data_type} = 'blob';
}
elsif ($sub_type_name eq 'TEXT') {
- if ($char_set_id == 3) {
+ if (defined $char_set_id && $char_set_id == 3) {
$info->{data_type} = 'blob sub_type text character set unicode_fss';
}
else {
if ($data_type =~ /^(?:char|varchar)\z/) {
$info->{size} = $char_length;
- if ($char_set_id == 3) {
+ if (defined $char_set_id && $char_set_id == 3) {
$info->{data_type} .= '(x) character set unicode_fss';
}
}
return $result;
}
+sub _view_definition {
+ my ($self, $view) = @_;
+
+ return scalar $self->schema->storage->dbh->selectrow_array(<<'EOF', {}, $view->name);
+SELECT rdb$view_source
+FROM rdb$relations
+WHERE rdb$relation_name = ?
+EOF
+}
+
=head1 SEE ALSO
L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
L<DBIx::Class::Schema::Loader::DBI>
-=head1 AUTHOR
+=head1 AUTHORS
-See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
+See L<DBIx::Class::Schema::Loader/AUTHORS>.
=head1 LICENSE