X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FDBI%2FSybase.pm;h=f3bfe74837bbc584f5a4084d11734d900070eb64;hb=ac7adbab6451299d70b5ecc59c6bb7f8a6f9473b;hp=bf541a3b5c7fb785b4cea300abf9d5952eaa4687;hpb=d4f84dd192edc7a64a0b1a9923f1bafc0bc5ef9d;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Parser/DBI/Sybase.pm b/lib/SQL/Translator/Parser/DBI/Sybase.pm index bf541a3..f3bfe74 100644 --- a/lib/SQL/Translator/Parser/DBI/Sybase.pm +++ b/lib/SQL/Translator/Parser/DBI/Sybase.pm @@ -1,25 +1,5 @@ package SQL::Translator::Parser::DBI::Sybase; -# ------------------------------------------------------------------- -# $Id: Sybase.pm 1440 2009-01-17 16:31:57Z jawnsy $ -# ------------------------------------------------------------------- -# Copyright (C) 2002-2009 SQLFairy Authors -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; version 2. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA -# ------------------------------------------------------------------- - =head1 NAME SQL::Translator::Parser::DBI::Sybase - parser for DBD::Sybase @@ -35,16 +15,17 @@ Uses DBI Catalog Methods. =cut use strict; +use warnings; use DBI; use SQL::Translator::Schema; use Data::Dumper; -use vars qw[ $DEBUG @EXPORT_OK ]; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; no strict 'refs'; -# ------------------------------------------------------------------- sub parse { my ( $tr, $dbh ) = @_; @@ -231,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} @@ -249,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; @@ -319,8 +300,6 @@ $table_info->{TABLE_NAME}, 1; -# ------------------------------------------------------------------- - =pod =head1 AUTHOR