X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FInterBase.pm;h=6d077aa9bff58ad986e16b233ba2109be07225fc;hb=c7e6dc1fd51af6feea5b585a691a80f904fb4d11;hp=3dd27cac1c95635fcafdaab8b27de384e879ca7e;hpb=6e566cc4a06b1661597200611a03320f969e2566;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 3dd27ca..6d077aa 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm @@ -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 { @@ -50,26 +47,26 @@ sub _setup { $self->next::method(@_); - $self->schema->storage->sql_maker->name_sep('.'); - 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) { $self->schema->storage->sql_maker->quote_char('"'); + $self->schema->storage->sql_maker->name_sep('.'); } else { $self->schema->storage->sql_maker->quote_char(undef); + $self->schema->storage->sql_maker->name_sep(undef); } } @@ -257,9 +254,6 @@ EOF elsif ($info->{data_type} eq 'character') { $info->{data_type} = 'char'; } - elsif ($info->{data_type} eq 'real') { - $info->{data_type} = 'float'; - } 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'; @@ -290,7 +284,7 @@ EOF $info->{default_value} = $quoted; } else { - $info->{default_value} = $def =~ /^\d/ ? $def : \$def; + $info->{default_value} = $def =~ /^-?\d/ ? $def : \$def; } }