X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FDBI%2FSybase.pm;h=ec8bcf3ec171b9c0f993ff76f4a6a9d5a4a933bc;hb=da93ce6850901652d43fa1033a1ea58fa82230b4;hp=2508c4a59accd61cf94a761e4b7258e18cf17523;hpb=935800450f88b0500c4fa7c3b174cd22b5f9eb56;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Parser/DBI/Sybase.pm b/lib/SQL/Translator/Parser/DBI/Sybase.pm index 2508c4a..ec8bcf3 100644 --- a/lib/SQL/Translator/Parser/DBI/Sybase.pm +++ b/lib/SQL/Translator/Parser/DBI/Sybase.pm @@ -15,17 +15,17 @@ Uses DBI Catalog Methods. =cut use strict; +use warnings; use DBI; use SQL::Translator::Schema; use Data::Dumper; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.60'; $DEBUG = 0 unless defined $DEBUG; no strict 'refs'; -# ------------------------------------------------------------------- sub parse { my ( $tr, $dbh ) = @_; @@ -212,7 +212,7 @@ $table_info->{TABLE_TYPE}, # add in primary key my $h = $dbh->selectall_hashref("sp_pkeys -$table_info->{TABLE_NAME}", 'COLUMN_NAME'); +[$table_info->{TABLE_NAME}]", 'COLUMN_NAME'); if (scalar keys %{$h} > 1) { my @c = map { $_->{COLUMN_NAME} @@ -230,7 +230,7 @@ $table_info->{TABLE_NAME}", 'COLUMN_NAME'); if (defined($stuff->{indexes}->{$table_info->{TABLE_NAME}})){ my $h = $dbh->selectall_hashref("sp_helpindex -$table_info->{TABLE_NAME}", 'INDEX_NAME'); +[$table_info->{TABLE_NAME}]", 'INDEX_NAME'); foreach (values %{$h}) { my $fields = $_->{'INDEX_KEYS'}; $fields =~ s/\s*//g; @@ -300,8 +300,6 @@ $table_info->{TABLE_NAME}, 1; -# ------------------------------------------------------------------- - =pod =head1 AUTHOR