1 package DBIx::Class::Storage::DBI::Sybase;
6 use base qw/DBIx::Class::Storage::DBI::NoBindVars/;
11 my $dbtype = eval { @{$self->dbh->selectrow_arrayref(qq{sp_server_info \@attribute_id=1})}[2] };
14 my $subclass = "DBIx::Class::Storage::DBI::Sybase::${dbtype}";
15 if ($self->load_optional_class($subclass) && !$self->isa($subclass)) {
16 bless $self, $subclass;
22 sub _dbh_last_insert_id {
23 my ($self, $dbh, $source, $col) = @_;
24 return ($dbh->selectrow_array('select @@identity'))[0];
28 int => qr/^ \-? \d+ $/x,
29 integer => qr/^ \-? \d+ $/x,
31 # TODO maybe need to add float/real/etc
34 sub should_quote_data_type {
36 my ($type, $value) = @_;
38 return $self->next::method(@_) if not defined $value;
40 if (my $re = $noquote->{$type}) {
41 return 0 if $value =~ $re;
44 return $self->next::method(@_);
51 DBIx::Class::Storage::DBI::Sybase - Storage::DBI subclass for Sybase
55 This subclass supports L<DBD::Sybase> for real Sybase databases. If
56 you are using an MSSQL database via L<DBD::Sybase>, see
57 L<DBIx::Class::Storage::DBI::Sybase::MSSQL>.
61 This storage driver uses L<DBIx::Class::Storage::DBI::NoBindVars> as a base.
62 This means that bind variables will be interpolated (properly quoted of course)
63 into the SQL query itself, without using bind placeholders.
65 More importantly this means that caching of prepared statements is explicitly
66 disabled, as the interpolation renders it useless.
70 Brandon L Black <blblack@gmail.com>
72 Justin Hunter <justin.d.hunter@gmail.com>
76 You may distribute this code under the same terms as Perl itself.