X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FODBC%2FMicrosoft_SQL_Server.pm;h=8519ee5bced7b441e22ee60da9df3d3e5d1efe3e;hb=37b17a93efef4652db90e299b247e55ab1145b0b;hp=9757eca3e56c203806b379078bfe2df9fdd1fb7a;hpb=820eebf7142f5a0bead4a67b522cea0a4523c82b;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm index 9757eca..8519ee5 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm @@ -4,11 +4,13 @@ use warnings; use base qw/DBIx::Class::Storage::DBI::MSSQL/; use mro 'c3'; + use Carp::Clan qw/^DBIx::Class/; use List::Util(); +use Scalar::Util (); __PACKAGE__->mk_group_accessors(simple => qw/ - _identity _using_dynamic_cursors + _using_dynamic_cursors /); =head1 NAME @@ -18,24 +20,12 @@ to Microsoft SQL Server over ODBC =head1 DESCRIPTION -This class implements support specific to Microsoft SQL Server over ODBC, -including auto-increment primary keys and SQL::Abstract::Limit dialect. It -is loaded automatically by by DBIx::Class::Storage::DBI::ODBC when it -detects a MSSQL back-end. - -=head1 IMPLEMENTATION NOTES - -Microsoft SQL Server supports three methods of retrieving the C -value for inserted row: C, C<@@IDENTITY>, and C. -C is used here because it is the safest. However, it must -be called is the same execute statement, not just the same connection. +This class implements support specific to Microsoft SQL Server over ODBC. It is +loaded automatically by by DBIx::Class::Storage::DBI::ODBC when it detects a +MSSQL back-end. -So, this implementation appends a C is used instead. +Most of the functionality is provided from the superclass +L. =head1 MULTIPLE ACTIVE STATEMENTS @@ -54,8 +44,12 @@ concurrent statements. Will add C<< odbc_cursortype => 2 >> to your DBI connection attributes. See L for more information. -This will not work with CODE ref connect_info's and will do nothing if you set -C yourself. +Alternatively, you can add it yourself and dynamic cursor support will be +automatically enabled. + +If you're using FreeTDS, C must be set to at least C<8.0>. + +This will not work with CODE ref connect_info's. B this will break C, and C