return $self->_dbh;
}
-sub _sql_maker_args {
- my ($self) = @_;
-
- return ( limit_dialect => $self->dbh );
-}
-
sub sql_maker {
my ($self) = @_;
unless ($self->_sql_maker) {
- $self->_sql_maker(new DBIC::SQL::Abstract( $self->_sql_maker_args ));
+ $self->_sql_maker(new DBIC::SQL::Abstract( limit_dialect => $self->dbh ));
}
return $self->_sql_maker;
}
my ($self) = @_;
my @info = @{$self->_connect_info || []};
$self->_dbh($self->_connect(@info));
- my $driver = $self->_dbh->{Driver}->{Name};
+ my $dbh = $self->_dbh;
+ my $driver = $dbh->{Driver}->{Name};
+ if ( $driver eq 'ODBC' and $dbh->get_info(17) =~ m{^DB2/400} ) {
+ $driver = 'ODBC400';
+ }
eval "require DBIx::Class::Storage::DBI::${driver}";
unless ($@) {
bless $self, "DBIx::Class::Storage::DBI::${driver}";
- $self->_rebless() if $self->can('_rebless');
}
# if on-connect sql statements are given execute them
foreach my $sql_statement (@{$self->on_connect_do || []}) {
If the value is of the form C<1=/path/name> then the trace output is
written to the file C</path/name>.
+This environment variable is checked when the storage object is first
+created (when you call connect on your schema). So, run-time changes
+to this environment variable will not take effect unless you also
+re-connect on your schema.
+
=head1 AUTHORS
Matt S. Trout <mst@shadowcatsystems.co.uk>