package SQL::Translator::Producer;
# -------------------------------------------------------------------
-# $Id: Producer.pm,v 1.8 2006-06-07 16:28:59 schiffbruechige Exp $
-# -------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
# This program is free software; you can redistribute it and/or
use strict;
use vars qw($VERSION);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/;
+$VERSION = '1.59';
sub produce { "" }
## They are special per Producer, and provide support for the old 'now()'
## default value exceptions
sub _apply_default_value {
- my (undef, $field_ref, $default, $exceptions, $noquote) = @_;
-
- my @noquote = (defined $noquote)?@$noquote:();
+ my (undef, $field_ref, $default, $exceptions) = @_;
if ($exceptions and ! ref $default) {
for (my $i = 0; $i < @$exceptions; $i += 2) {
}
}
- my $qc = (grep m/^$default$/, @noquote)?"":"'";
if (ref $default) {
$$field_ref .= " DEFAULT $$default";
} else {
- $$field_ref .= " DEFAULT $qc$default$qc";
+ $$field_ref .= " DEFAULT '$default'";
}
}