1 package DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server::Cursor;
6 use base 'DBIx::Class::Storage::DBI::Cursor';
9 use DBIx::Class::Storage::DBI::ADO::CursorUtils qw/_normalize_guids _strip_trailing_binary_nulls/;
10 use DBIx::Class::ResultSource::FromSpec::Util 'fromspec_columns_info';
15 DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server::Cursor - Remove trailing
16 NULLs in binary data and normalize GUIDs for MSSQL over ADO
20 This class is for removing trailing C<NULL>s from binary data and removing braces
21 from GUIDs retrieved from Microsoft SQL Server over ADO.
23 You probably don't want to be here, see
24 L<DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server> for information on the
25 Microsoft SQL Server driver for ADO and L<DBIx::Class::Storage::DBI::MSSQL> for
26 the Microsoft SQL Server driver base class.
28 Unfortunately when using L<DBD::ADO>, binary data comes back padded with
29 trailing C<NULL>s and GUIDs come back wrapped in braces, the purpose of this
30 class is to remove the C<NULL>s and braces.
31 L<DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server> sets
32 L<cursor_class|DBIx::Class::Storage::DBI/cursor_class> to this class by
33 default. It is overridable via your
34 L<connect_info|DBIx::Class::Storage::DBI/connect_info>.
36 You can use L<DBIx::Class::Cursor::Cached> safely with this class and not lose
37 the binary data normalizing functionality,
38 L<::Cursor::Cached|DBIx::Class::Cursor::Cached> uses the underlying class data
39 for the inner cursor class.
46 my @row = $self->next::method(@_);
48 $self->{_colinfos} ||= fromspec_columns_info($self->args->[0]);
57 _strip_trailing_binary_nulls(
70 my @rows = $self->next::method(@_);
72 $self->{_colinfos} ||= fromspec_columns_info($self->args->[0]);
82 _strip_trailing_binary_nulls(
93 =head1 FURTHER QUESTIONS?
95 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
97 =head1 COPYRIGHT AND LICENSE
99 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
100 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
101 redistribute it and/or modify it under the same terms as the
102 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.