Clarify sybase/nobindvars problem (should have never merged in the 1st place)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase.pm
CommitLineData
3885cff6 1package DBIx::Class::Storage::DBI::Sybase;
2
3use strict;
4use warnings;
5
6use base qw/DBIx::Class::Storage::DBI::NoBindVars/;
7
5432c6ae 8my $noquote = {
9 int => qr/^ \-? \d+ $/x,
10 integer => qr/^ \-? \d+ $/x,
11
12 # TODO maybe need to add float/real/etc
13};
b50a5275 14
15sub should_quote_data_type {
16 my $self = shift;
5432c6ae 17 my ($type, $value) = @_;
18
19 return $self->next::method(@_) if not defined $value;
20
21 if (my $re = $noquote->{$type}) {
22 return 0 if $value =~ $re;
23 }
24
b50a5275 25 return $self->next::method(@_);
26}
27
3885cff6 281;
29
30=head1 NAME
31
32DBIx::Class::Storage::DBI::Sybase - Storage::DBI subclass for Sybase
33
34=head1 SYNOPSIS
35
81092e2d 36This subclass supports L<DBD::Sybase> for real Sybase databases. If
37you are using an MSSQL database via L<DBD::Sybase>, see
38L<DBIx::Class::Storage::DBI::Sybase::MSSQL>.
3885cff6 39
40=head1 AUTHORS
41
42Brandon L Black <blblack@gmail.com>
43
44=head1 LICENSE
45
46You may distribute this code under the same terms as Perl itself.
47
48=cut