Have has_one/might_have warn if set on nullable columns.
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / ADO / Microsoft_SQL_Server.pm
CommitLineData
4ffa5700 1package DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server;
2
3use strict;
4use warnings;
5
6use base qw/
7 DBIx::Class::Storage::DBI::ADO
8 DBIx::Class::Storage::DBI::MSSQL
9/;
10use mro 'c3';
11
12sub _rebless {
13 my $self = shift;
14 $self->_identity_method('@@identity');
15}
16
8bcd9ece 17sub _sth_bind_param {
18 my ($self, $sth, $placeholder_index, $data, $attributes, @extra) = @_;
19
20 $attributes->{ado_size} = 8000; # max VARCHAR on MSSQL
21
22 $self->next::method($sth, $placeholder_index, $data, $attributes, @extra);
23}
24
4ffa5700 251;
26
27=head1 NAME
28
9f0c231f 29DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server - Support for Microsoft
4ffa5700 30SQL Server via DBD::ADO
31
32=head1 SYNOPSIS
33
34This subclass supports MSSQL server connections via L<DBD::ADO>.
35
36=head1 DESCRIPTION
37
38The MSSQL specific functionality is provided by
39L<DBIx::Class::Storage::DBI::MSSQL>.
40
41C<_identity_method> is set to C<@@identity>, as C<SCOPE_IDENTITY()> doesn't work
42with L<DBD::ADO>. See L<DBIx::Class::Storage::DBI::MSSQL/IMPLEMENTATION NOTES>
43for caveats regarding this.
44
45=head1 AUTHOR
46
47See L<DBIx::Class/CONTRIBUTORS>.
48
49=head1 LICENSE
50
51You may distribute this code under the same terms as Perl itself.
52
53=cut