AUTHORS mass update; mst doesn't have to take credit for -everything- :)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Oracle.pm
1 package DBIx::Class::Storage::DBI::Oracle;
2
3 use strict;
4 use warnings;
5
6 use base qw/DBIx::Class::Storage::DBI/;
7 use mro 'c3';
8 use Try::Tiny;
9 use namespace::clean;
10
11 sub _rebless {
12   my ($self) = @_;
13
14   # Default driver
15   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   $self->ensure_class_loaded ($class);
20   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 AUTHOR AND CONTRIBUTORS
44
45 See L<AUTHOR|DBIx::Class/AUTHOR> and L<CONTRIBUTORS|DBIx::Class/CONTRIBUTORS> in DBIx::Class
46
47 =head1 LICENSE
48
49 You may distribute this code under the same terms as Perl itself.
50
51 =cut