in Pg storage, added a warning for case when the nextval sequence is not schema qualified
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / Storage / DBI / Sybase / Base.pm
index 9ce130f..757d4d9 100644 (file)
@@ -4,6 +4,9 @@ package # hide from PAUSE
 use strict;
 use warnings;
 
+use base qw/DBIx::Class::Storage::DBI/;
+use mro 'c3';
+
 =head1 NAME
 
 DBIx::Class::Storage::DBI::Sybase::Base - Common functionality for drivers using
@@ -24,6 +27,20 @@ sub _ping {
   return $@ ? 0 : 1;
 }
 
+sub _placeholders_supported {
+  my $self = shift;
+  my $dbh  = $self->_get_dbh;
+
+  return eval {
+# There's also $dbh->{syb_dynamic_supported} but it can be inaccurate for this
+# purpose.
+    local $dbh->{PrintError} = 0;
+    local $dbh->{RaiseError} = 1;
+# this specifically tests a bind that is NOT a string
+    $dbh->selectrow_array('select 1 where 1 = ?', {}, 1);
+  };
+}
+
 1;
 
 =head1 AUTHORS