X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FInterBase.pm;h=48e1e7b26486607f9dd7dae95b1071c3866a9f1d;hb=be9f4d42a56c7cc4b7c0940edaca6c4735b9ccac;hp=f6d2d42a0a3af24f09d0d7ba5e3b2d62c7e98c79;hpb=c930f78be67718446858647b878b1e4c590538f3;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm index f6d2d42..48e1e7b 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm @@ -2,13 +2,13 @@ package DBIx::Class::Schema::Loader::DBI::InterBase; use strict; use warnings; -use namespace::autoclean; -use Class::C3; +use mro 'c3'; use base qw/DBIx::Class::Schema::Loader::DBI/; use Carp::Clan qw/^DBIx::Class/; use List::Util 'first'; +use namespace::clean; -our $VERSION = '0.07000'; +our $VERSION = '0.07001'; =head1 NAME @@ -21,16 +21,16 @@ See L and L. =head1 COLUMN NAME CASE ISSUES -By default column names from unquoted DDL will be generated in uppercase, as -that is the only way they will work with quoting on. +By default column names from unquoted DDL will be generated in lowercase, for +consistency with other backends. -See the L option -to false if you would like to have lowercase column names. +Set the L option +to true if you would like to have column names in the internal case, which is +uppercase for DDL that uses unquoted identifiers. -Setting this option is a good idea if your DDL uses unquoted identifiers and -you will not use quoting (the -L option in -L.) +Do not use quoting (the L +option in L when in the +default C<< preserve_case => 0 >> mode. Be careful to also not use any SQL reserved words in your DDL. @@ -40,9 +40,6 @@ names) in your Result classes that will only work with quoting off. Mixed-case table and column names will be ignored when this option is on and will not work with quoting turned off. -B This option used to be called C but has been removed in -favor of the more generic option. - =cut sub _setup { @@ -53,14 +50,14 @@ sub _setup { if (not defined $self->preserve_case) { warn <<'EOF'; -WARNING: Assuming mixed-case Firebird DDL, see +WARNING: Assuming unquoted Firebird DDL, see perldoc DBIx::Class::Schema::Loader::DBI::InterBase and the 'preserve_case' option in perldoc DBIx::Class::Schema::Loader::Base for more information. EOF - $self->preserve_case(1); + $self->preserve_case(0); } if ($self->preserve_case) { @@ -257,6 +254,9 @@ EOF elsif ($info->{data_type} eq 'character') { $info->{data_type} = 'char'; } + elsif ($info->{data_type} eq 'float') { + $info->{data_type} = 'real'; + } elsif ($info->{data_type} eq 'int64' || $info->{data_type} eq '-9581') { # the constant is just in case, the query should pick up the type $info->{data_type} = 'bigint'; @@ -287,7 +287,7 @@ EOF $info->{default_value} = $quoted; } else { - $info->{default_value} = $def =~ /^\d/ ? $def : \$def; + $info->{default_value} = $def =~ /^-?\d/ ? $def : \$def; } }