Backout sybase changes
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase / Microsoft_SQL_Server.pm
index 27cda34..08b1807 100644 (file)
@@ -9,6 +9,17 @@ use base qw/
 /;
 use mro 'c3';
 
+sub _rebless {
+  my $self = shift;
+  my $dbh  = $self->_get_dbh;
+
+  if (not $self->_typeless_placeholders_supported) {
+    bless $self,
+      'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars';
+    $self->_rebless;
+  }
+}
+
 1;
 
 =head1 NAME
@@ -20,14 +31,15 @@ SQL Server via DBD::Sybase
 
 This subclass supports MSSQL server connections via L<DBD::Sybase>.
 
-=head1 CAVEATS
+=head1 DESCRIPTION
 
-This storage driver uses L<DBIx::Class::Storage::DBI::NoBindVars> as a base.
-This means that bind variables will be interpolated (properly quoted of course)
-into the SQL query itself, without using bind placeholders.
+This driver tries to determine whether your version of L<DBD::Sybase> and
+supporting libraries (usually FreeTDS) support using placeholders, if not the
+storage will be reblessed to
+L<DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars>.
 
-More importantly this means that caching of prepared statements is explicitly
-disabled, as the interpolation renders it useless.
+The MSSQL specific functionality is provided by
+L<DBIx::Class::Storage::DBI::MSSQL>.
 
 =head1 AUTHOR