move Firebird ODBC driver ->type_info override into driver
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / ODBC / Firebird.pm
1 package DBIx::Class::Schema::Loader::DBI::ODBC::Firebird;
2
3 use strict;
4 use warnings;
5 use base qw/
6     DBIx::Class::Schema::Loader::DBI::ODBC
7     DBIx::Class::Schema::Loader::DBI::InterBase
8 /;
9 use Carp::Clan qw/^DBIx::Class/;
10 use mro 'c3';
11
12 our $VERSION = '0.07010';
13
14 =head1 NAME
15
16 DBIx::Class::Schema::Loader::DBI::ODBC::Firebird - ODBC wrapper for
17 L<DBIx::Class::Schema::Loader::DBI::InterBase>
18
19 =head1 DESCRIPTION
20
21 Proxy for L<DBIx::Class::Schema::Loader::DBI::InterBase> when using L<DBD::ODBC>.
22
23 See L<DBIx::Class::Schema::Loader::Base> for usage information.
24
25 =cut
26
27 # Some (current) versions of the ODBC driver have a bug where ->type_info breaks
28 # with "data truncated". This "fixes" it, but some type names are truncated.
29 sub _dbh_type_info {
30     my ($self, $type_num) = @_;
31
32     my $dbh = $self->schema->storage->dbh;
33
34     local $dbh->{LongReadLen} = 100_000;
35     local $dbh->{LongTruncOk} = 1;
36
37     return $dbh->type_info($type_num);
38 }
39
40 =head1 SEE ALSO
41
42 L<DBIx::Class::Schema::Loader::DBI::InterBase>,
43 L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
44 L<DBIx::Class::Schema::Loader::DBI>
45
46 =head1 AUTHOR
47
48 See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
49
50 =head1 LICENSE
51
52 This library is free software; you can redistribute it and/or modify it under
53 the same terms as Perl itself.
54
55 =cut
56
57 1;