MSSQL.pm

filter: Statementstmt 78.5% 11 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 78.9% 15 / 19 CC 1 SCAR 2.2
CC
1
Cov
79%
connection
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« MSSQL/SQLMaker.pm ↑ Summary MSSQL/Storage.pm »
1 package DBIO::MSSQL;
2 1 our $VERSION = '0.900001';
3  
4  
5 # ABSTRACT: Microsoft SQL Server-specific schema management for DBIO
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use base 'DBIO::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 0 ▶sub connection {
Subroutine connection: not called CC=1 SCAR=6.9
Pod documented
14 0 my ($self, @info) = @_;
15 0 $self->storage_type('+DBIO::MSSQL::Storage');
16 0 return $self->next::method(@info);
17 }
18  
19  
20  
21 1 1;
22  
23 __END__
24  
25 =pod
26  
27 =encoding UTF-8
28  
29 =head1 NAME
30  
31 DBIO::MSSQL - Microsoft SQL Server-specific schema management for DBIO
32  
33 =head1 VERSION
34  
35 version 0.900001
36  
37 =head1 SYNOPSIS
38  
39 package MySchema;
40 use DBIO Schema => -ms;
41  
42 # ... later
43 my $schema = MySchema->connect($dsn, $user, $pass);
44 # Storage is automatically set to DBIO::MSSQL::Storage
45  
46 =head1 DESCRIPTION
47  
48 This class is a thin L<DBIO> subclass that automatically sets the storage
49 class to L<DBIO::MSSQL::Storage> when a connection is established. Load it
50 into your schema instead of the base L<DBIO> class when connecting to
51 Microsoft SQL Server databases.
52  
53 The C<-ms> shortcut (see L<DBIO::Shortcut::ms>) is the recommended way to
54 enable the MSSQL driver: on a schema class C<use DBIO 'Schema', -ms;> pins
55 the storage to L<DBIO::MSSQL::Storage>, and on a result class
56 C<use DBIO 'Core', -ms;> loads the L<DBIO::MSSQL::Result> component.
57  
58 For connections via L<DBD::Sybase> (including FreeTDS), see
59 L<DBIO::MSSQL::Storage::Sybase>.
60  
61 =head1 METHODS
62  
63 =head2 connection
64  
65 $schema->connection($dsn, $user, $pass, \%attrs);
66  
67 Sets the storage type to L<DBIO::MSSQL::Storage> before delegating to the
68 parent C<connection> method.
69  
70 =head1 SEE ALSO
71  
72 =over
73  
74 =item * L<DBIO::MSSQL::Storage> - MSSQL storage implementation
75  
76 =item * L<DBIO::MSSQL::SQLMaker> - MSSQL SQL dialect
77  
78 =item * L<DBIO::MSSQL::Storage::Sybase> - MSSQL via L<DBD::Sybase>
79  
80 =item * L<DBIO> - Base ORM class
81  
82 =back
83  
84 =head1 AUTHOR
85  
86 DBIO & DBIx::Class Authors
87  
88 =head1 COPYRIGHT AND LICENSE
89  
90 Copyright (C) 2026 DBIO Authors
91 Portions Copyright (C) 2005-2025 DBIx::Class Authors
92 Based on DBIx::Class, heavily modified.
93  
94 This is free software; you can redistribute it and/or modify it under
95 the same terms as the Perl 5 programming language system itself.
96  
97 =cut
« MSSQL/SQLMaker.pm ↑ Summary MSSQL/Storage.pm »