package DBIx::Class::Storage::DBI::Sybase::NoBindVars;
-use Class::C3;
use base qw/
DBIx::Class::Storage::DBI::NoBindVars
DBIx::Class::Storage::DBI::Sybase
/;
+use mro 'c3';
use List::Util ();
use Scalar::Util ();
-sub _rebless {
+sub _init {
my $self = shift;
$self->disable_sth_caching(1);
- $self->insert_txn(0);
+ $self->_identity_method('@@IDENTITY');
+ $self->next::method (@_);
}
-# this works when NOT using placeholders
-sub _fetch_identity_sql { 'SELECT @@IDENTITY' }
+sub _fetch_identity_sql { 'SELECT ' . $_[0]->_identity_method }
my $number = sub { Scalar::Util::looks_like_number($_[0]) };