AUTHORS mass update; mst doesn't have to take credit for -everything- :)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Oracle.pm
CommitLineData
843f8ecd 1package DBIx::Class::Storage::DBI::Oracle;
2
3use strict;
4use warnings;
5
18360aed 6use base qw/DBIx::Class::Storage::DBI/;
2ad62d97 7use mro 'c3';
ed7ab0f4 8use Try::Tiny;
fd323bf1 9use namespace::clean;
843f8ecd 10
18360aed 11sub _rebless {
bf51641f 12 my ($self) = @_;
843f8ecd 13
bf51641f 14 # Default driver
86b23415 15 my $class = $self->_server_info->{normalized_dbms_version} < 9
bf51641f 16 ? 'DBIx::Class::Storage::DBI::Oracle::WhereJoins'
17 : 'DBIx::Class::Storage::DBI::Oracle::Generic';
52b420dd 18
bf51641f 19 $self->ensure_class_loaded ($class);
20 bless $self, $class;
099049b5 21}
22
843f8ecd 231;
24
75d07914 25=head1 NAME
843f8ecd 26
18360aed 27DBIx::Class::Storage::DBI::Oracle - Base class for Oracle driver
843f8ecd 28
843f8ecd 29=head1 DESCRIPTION
30
18360aed 31This class simply provides a mechanism for discovering and loading a sub-class
08fabf59 32for a specific version Oracle backend. It should be transparent to the user.
843f8ecd 33
86b23415 34For Oracle major versions < 9 it loads the ::Oracle::WhereJoins subclass,
08fabf59 35which unrolls the ANSI join style DBIC normally generates into entries in
36the WHERE clause for compatibility purposes. To force usage of this version
37no matter the database version, add
38
39 __PACKAGE__->storage_type('::DBI::Oracle::WhereJoins');
40
41to your Schema class.
843f8ecd 42
0c11ad0e 43=head1 AUTHOR AND CONTRIBUTORS
843f8ecd 44
0c11ad0e 45See L<AUTHOR|DBIx::Class/AUTHOR> and L<CONTRIBUTORS|DBIx::Class/CONTRIBUTORS> in DBIx::Class
843f8ecd 46
47=head1 LICENSE
48
49You may distribute this code under the same terms as Perl itself.
50
51=cut