DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars - Support for Microsoft


DBIx-Class documentation Contained in the DBIx-Class distribution.

Index


Code Index:

NAME

Top

DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars - Support for Microsoft SQL Server via DBD::Sybase without placeholders

SYNOPSIS

Top

This subclass supports MSSQL server connections via DBD::Sybase when ? style placeholders are not available.

DESCRIPTION

Top

If you are using this driver then your combination of DBD::Sybase and libraries (most likely FreeTDS) does not support ? style placeholders.

This storage driver uses 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.

More importantly this means that caching of prepared statements is explicitly disabled, as the interpolation renders it useless.

In all other respects, it is a subclass of DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server.

AUTHOR

Top

See CONTRIBUTORS in DBIx::Class.

LICENSE

Top

You may distribute this code under the same terms as Perl itself.


DBIx-Class documentation Contained in the DBIx-Class distribution.

package DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars;

use strict;
use warnings;

use base qw/
  DBIx::Class::Storage::DBI::NoBindVars
  DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server
/;
use mro 'c3';

sub _init {
  my $self = shift;
  $self->disable_sth_caching(1);

  $self->next::method(@_);
}

1;