File Coverage

blib/lib/DBIx/Class/Storage/DBI/Oracle.pm
Criterion Covered Total %
statement 18 22 81.8
branch 0 2 0.0
condition n/a
subroutine 6 7 85.7
pod n/a
total 24 31 77.4


line stmt bran cond sub pod time code
1             package DBIx::Class::Storage::DBI::Oracle;
2              
3 2     2   1178 use strict;
  2         4  
  2         62  
4 2     2   10 use warnings;
  2         5  
  2         65  
5              
6 2     2   11 use base qw/DBIx::Class::Storage::DBI/;
  2         4  
  2         221  
7 2     2   22 use mro 'c3';
  2         5  
  2         12  
8 2     2   67 use Try::Tiny;
  2         4  
  2         96  
9 2     2   13 use namespace::clean;
  2         3  
  2         10  
10              
11             sub _rebless {
12 0     0     my ($self) = @_;
13              
14             # Default driver
15 0 0         my $class = $self->_server_info->{normalized_dbms_version} < 9
16             ? 'DBIx::Class::Storage::DBI::Oracle::WhereJoins'
17             : 'DBIx::Class::Storage::DBI::Oracle::Generic';
18              
19 0           $self->ensure_class_loaded ($class);
20 0           bless $self, $class;
21             }
22              
23             1;
24              
25             =head1 NAME
26              
27             DBIx::Class::Storage::DBI::Oracle - Base class for Oracle driver
28              
29             =head1 DESCRIPTION
30              
31             This class simply provides a mechanism for discovering and loading a sub-class
32             for a specific version Oracle backend. It should be transparent to the user.
33              
34             For Oracle major versions < 9 it loads the ::Oracle::WhereJoins subclass,
35             which unrolls the ANSI join style DBIC normally generates into entries in
36             the WHERE clause for compatibility purposes. To force usage of this version
37             no matter the database version, add
38              
39             __PACKAGE__->storage_type('::DBI::Oracle::WhereJoins');
40              
41             to your Schema class.
42              
43             =head1 FURTHER QUESTIONS?
44              
45             Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
46              
47             =head1 COPYRIGHT AND LICENSE
48              
49             This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
50             by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
51             redistribute it and/or modify it under the same terms as the
52             L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.