1 package DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server;
7 DBIx::Class::Storage::DBI::ADO
8 DBIx::Class::Storage::DBI::MSSQL
14 $self->_identity_method('@@identity');
17 sub source_bind_attributes {
18 my ($self, $source) = @_;
21 foreach my $column ($source->columns) {
23 my $data_type = $source->column_info($column)->{data_type} || '';
24 $bind_attributes->{$column} = $self->bind_attribute_by_data_type($data_type)
26 $bind_attributes->{$column}{ado_size} ||= 8000; # max VARCHAR
29 return $bind_attributes;
32 sub bind_attribute_by_data_type {
33 my ($self, $data_type) = @_;
36 $self->_mssql_max_data_type_representation_size_in_bytes->{$data_type};
39 $res->{ado_size} = $max_size if $max_size;
45 sub _mssql_max_data_type_representation_size_in_bytes {
48 my $blob_max = $self->_get_dbh->{LongReadLen} || 32768;
74 datetimeoffset => 100,
85 DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server - Support for Microsoft
86 SQL Server via DBD::ADO
90 This subclass supports MSSQL server connections via L<DBD::ADO>.
94 The MSSQL specific functionality is provided by
95 L<DBIx::Class::Storage::DBI::MSSQL>.
97 C<_identity_method> is set to C<@@identity>, as C<SCOPE_IDENTITY()> doesn't work
98 with L<DBD::ADO>. See L<DBIx::Class::Storage::DBI::MSSQL/IMPLEMENTATION NOTES>
99 for caveats regarding this.
103 See L<DBIx::Class/CONTRIBUTORS>.
107 You may distribute this code under the same terms as Perl itself.