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=2a1ff2eee1d8775ff8cca7144d6d36b24bb0605a;hp=19f332f4b6e574a8dfb8c1314aae15f9d083d90d;hpb=8ec0dd691ba3dfebbc9642e56e0157ea3d5408f3;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 19f332f..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 { @@ -53,23 +50,23 @@ 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); } - $self->schema->storage->sql_maker->name_sep('.'); - 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); } } @@ -287,7 +284,7 @@ EOF $info->{default_value} = $quoted; } else { - $info->{default_value} = $def =~ /^\d/ ? $def : \$def; + $info->{default_value} = $def =~ /^-?\d/ ? $def : \$def; } }