[Bast-commits] r6524 -
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat Jun 6 02:40:52 GMT 2009
Author: caelum
Date: 2009-06-06 02:40:51 +0000 (Sat, 06 Jun 2009)
New Revision: 6524
Modified:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm
Log:
tweaks to sybase types
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm 2009-06-05 19:03:14 UTC (rev 6523)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm 2009-06-06 02:40:51 UTC (rev 6524)
@@ -18,15 +18,17 @@
my $number = sub { Scalar::Util::looks_like_number($_[0]) };
+my $decimal = sub { $_[0] =~ /^ [-+]? \d+ (?:\.\d*)? \z/x };
+
my %noquote = (
- int => sub { $_[0] =~ /^ -? \d+ \z/x },
+ int => sub { $_[0] =~ /^ [-+]? \d+ \z/x },
bit => => sub { $_[0] =~ /^[01]\z/ },
- money => sub { $_[0] =~ /^\$ \d+ (\.\d*)? \z/x },
+ money => sub { $_[0] =~ /^\$ \d+ (?:\.\d*)? \z/x },
float => $number,
real => $number,
double => $number,
- decimal => $number,
- numeric => $number,
+ decimal => $decimal,
+ numeric => $decimal,
);
sub should_quote_data_type {
More information about the Bast-commits
mailing list