make insert work as a nested transaction too
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase / Base.pm
index be57610..af2a98f 100644 (file)
@@ -27,6 +27,19 @@ sub _ping {
   return $@ ? 0 : 1;
 }
 
+sub _placeholders_supported {
+  my $self = shift;
+  my $dbh  = $self->_dbh;
+
+  return eval {
+# There's also $dbh->{syb_dynamic_supported} but it can be inaccurate for this
+# purpose.
+    local $dbh->{PrintError} = 0;
+# this specifically tests a bind that is NOT a string
+    $dbh->selectrow_array('select 1 where 1 = ?', {}, 1);
+  };
+}
+
 1;
 
 =head1 AUTHORS