package SQL::Translator::Producer::Oracle;
# -------------------------------------------------------------------
-# $Id: Oracle.pm,v 1.17 2003-08-15 16:26:44 kycl4rk Exp $
+# $Id: Oracle.pm,v 1.18 2003-08-17 01:11:54 rossta Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $VERSION $DEBUG $WARN ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.17 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.18 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
use SQL::Translator::Schema::Constants;
my @size = $field->size;
my %extra = $field->extra;
my $list = $extra{'list'} || [];
- my $commalist = join ",", @$list;
+ # \todo deal with embedded quotes
+ my $commalist = "'" . (join "', '", @$list) . "'";
if ( $data_type eq 'enum' ) {
$check = "CHECK ($field_name IN ($commalist))";
package SQL::Translator::Producer::Sybase;
# -------------------------------------------------------------------
-# $Id: Sybase.pm,v 1.4 2003-06-11 04:00:44 kycl4rk Exp $
+# $Id: Sybase.pm,v 1.5 2003-08-17 01:11:54 rossta Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $DEBUG $WARN $VERSION ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 1 unless defined $DEBUG;
use Data::Dumper;
my $orig_data_type = $data_type;
my %extra = $field->extra;
my $list = $extra{'list'} || [];
- my $commalist = join ",", @$list;
+ # \todo deal with embedded quotes
+ my $commalist = "'" . join("','", @$list) . "'";
my $seq_name;
if ( $data_type eq 'enum' ) {