[Bast-commits] r3324 - in branches/DBIx-Class/bulk_create: .
lib/DBIx/Class lib/DBIx/Class/Storage
lib/DBIx/Class/Storage/DBI/Oracle t/lib
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Fri May 18 13:24:00 GMT 2007
Author: castaway
Date: 2007-05-18 13:24:00 +0100 (Fri, 18 May 2007)
New Revision: 3324
Modified:
branches/DBIx-Class/bulk_create/
branches/DBIx-Class/bulk_create/Changes
branches/DBIx-Class/bulk_create/Makefile.PL
branches/DBIx-Class/bulk_create/lib/DBIx/Class/Schema.pm
branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI.pm
branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI/Oracle/WhereJoins.pm
branches/DBIx-Class/bulk_create/t/lib/DBICTest.pm
Log:
r3302 at lilith (orig r3300): matthewt | 2007-05-11 04:54:27 +0100
eliminate the last of the AutoCommit warnings
r3304 at lilith (orig r3302): matthewt | 2007-05-11 13:38:18 +0100
fixup for Oracle WHERE join stuff from abraxxa
r3310 at lilith (orig r3308): claco | 2007-05-12 02:31:37 +0100
Require CAG 0.05002 to kill Class::Inspector warnings.
r3317 at lilith (orig r3315): blblack | 2007-05-14 23:59:07 +0100
default AutoCommit to 1 if not explicitly set, and stop warning about it
Property changes on: branches/DBIx-Class/bulk_create
___________________________________________________________________
Name: svk:merge
- 168d5346-440b-0410-b799-f706be625ff1:/DBIx-Class-current:2207
462d4d0c-b505-0410-bf8e-ce8f877b3390:/local/bast/DBIx-Class:3159
78d5d833-3a7e-474d-aed6-cfba645156b5:/local/DBIx-Class.current:29201
78d5d833-3a7e-474d-aed6-cfba645156b5:/local/DBIx-Class.oracle8:29250
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-C3:318
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-current:3296
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-joins:173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-resultset:570
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/collapse_result_rewrite:3292
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/column_info_from_storage:2596
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/datetime:1716
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/find_compat:1855
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/find_unique_query_fixes:2142
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/inflate:1988
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/load_namespaces:2725
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/many_to_many:2025
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/param_bind:3015
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/re_refactor_bugfix:1944
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/reorganize_tests:1827
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/resultset-new-refactor:1766
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/resultset_2_electric_boogaloo:2175
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/resultset_cleanup:2102
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/source-handle:2975
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/sqlt_tests_refactor:2043
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/storage_exceptions:2617
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/versioning:2930
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class:3225
+ 168d5346-440b-0410-b799-f706be625ff1:/DBIx-Class-current:2207
462d4d0c-b505-0410-bf8e-ce8f877b3390:/local/bast/DBIx-Class:3159
78d5d833-3a7e-474d-aed6-cfba645156b5:/local/DBIx-Class.current:29201
78d5d833-3a7e-474d-aed6-cfba645156b5:/local/DBIx-Class.oracle8:29250
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-C3:318
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-current:3315
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-joins:173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-resultset:570
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/collapse_result_rewrite:3292
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/column_info_from_storage:2596
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/datetime:1716
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/find_compat:1855
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/find_unique_query_fixes:2142
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/inflate:1988
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/load_namespaces:2725
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/many_to_many:2025
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/param_bind:3015
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/re_refactor_bugfix:1944
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/reorganize_tests:1827
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/resultset-new-refactor:1766
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/resultset_2_electric_boogaloo:2175
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/resultset_cleanup:2102
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/source-handle:2975
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/sqlt_tests_refactor:2043
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/storage_exceptions:2617
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class/versioning:2930
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class:3225
Modified: branches/DBIx-Class/bulk_create/Changes
===================================================================
--- branches/DBIx-Class/bulk_create/Changes 2007-05-18 10:37:41 UTC (rev 3323)
+++ branches/DBIx-Class/bulk_create/Changes 2007-05-18 12:24:00 UTC (rev 3324)
@@ -9,7 +9,7 @@
is_foreign_key_constrain to allow explicit control over wether or
not a foreign constraint is needed
- resultset_class/result_class now (again) auto loads the specified
- class; requires Class::Accessor::Grouped 0.05001+
+ class; requires Class::Accessor::Grouped 0.05002+
0.07006 2007-04-17 23:18:00
- Lots of documentation updates
Modified: branches/DBIx-Class/bulk_create/Makefile.PL
===================================================================
--- branches/DBIx-Class/bulk_create/Makefile.PL 2007-05-18 10:37:41 UTC (rev 3323)
+++ branches/DBIx-Class/bulk_create/Makefile.PL 2007-05-18 12:24:00 UTC (rev 3324)
@@ -15,7 +15,7 @@
requires 'DBI' => 1.40;
requires 'Module::Find' => 0;
requires 'Class::Inspector' => 0;
-requires 'Class::Accessor::Grouped' => 0.05001;
+requires 'Class::Accessor::Grouped' => 0.05002;
requires 'JSON' => 1.00;
# Perl 5.8.0 doesn't have utf8::is_utf8()
Modified: branches/DBIx-Class/bulk_create/lib/DBIx/Class/Schema.pm
===================================================================
--- branches/DBIx-Class/bulk_create/lib/DBIx/Class/Schema.pm 2007-05-18 10:37:41 UTC (rev 3323)
+++ branches/DBIx-Class/bulk_create/lib/DBIx/Class/Schema.pm 2007-05-18 12:24:00 UTC (rev 3324)
@@ -503,7 +503,8 @@
sub compose_connection {
my ($self, $target, @info) = @_;
- warn "compose_connection deprecated as of 0.08000" unless $warn++;
+ warn "compose_connection deprecated as of 0.08000"
+ unless ($INC{"DBIx/Class/CDBICompat.pm"} || $warn++);
my $base = 'DBIx::Class::ResultSetProxy';
eval "require ${base};";
Modified: branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI/Oracle/WhereJoins.pm
===================================================================
--- branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI/Oracle/WhereJoins.pm 2007-05-18 10:37:41 UTC (rev 3323)
+++ branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI/Oracle/WhereJoins.pm 2007-05-18 12:24:00 UTC (rev 3324)
@@ -58,10 +58,10 @@
die "Can't handle full outer joins in Oracle 8 yet!\n"
if $to_jt->{-join_type} =~ /full/i;
- $left_join = q{(+)} if $to_jt->{-join_type} =~ /right/i
+ $left_join = q{(+)} if $to_jt->{-join_type} =~ /left/i
&& $to_jt->{-join_type} !~ /inner/i;
- $right_join = q{(+)} if $to_jt->{-join_type} =~ /left/i
+ $right_join = q{(+)} if $to_jt->{-join_type} =~ /right/i
&& $to_jt->{-join_type} !~ /inner/i;
}
Modified: branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI.pm 2007-05-18 10:37:41 UTC (rev 3323)
+++ branches/DBIx-Class/bulk_create/lib/DBIx/Class/Storage/DBI.pm 2007-05-18 12:24:00 UTC (rev 3324)
@@ -335,8 +335,9 @@
recommend that you always explicitly set C<AutoCommit> to either
C<0> or C<1>. L<DBIx::Class> further recommends that it be set
to C<1>, and that you perform transactions via our L</txn_do>
-method. L<DBIx::Class> will emit a warning if you fail to explicitly
-set C<AutoCommit> one way or the other. See below for more details.
+method. L<DBIx::Class> will set it to C<1> if you do not do explicitly
+set it to zero. This is the default for most DBDs. See below for more
+details.
In either case, if the final argument in your connect_info happens
to be a hashref, C<connect_info> will look there for several
@@ -482,16 +483,23 @@
pop(@$info) if !keys %$last_info;
}
- # Now check the (possibly new) final argument for AutoCommit,
- # but not in the coderef case, obviously.
if(ref $info->[0] ne 'CODE') {
- $last_info = $info->[3];
+ # Extend to 3 arguments with undefs, if necessary
+ while(scalar(@$info) < 3) { push(@$info, undef) }
- warn "You *really* should explicitly set AutoCommit "
- . "(preferably to 1) in your db connect info"
- if !$last_info
- || ref $last_info ne 'HASH'
- || !defined $last_info->{AutoCommit};
+ # Complain if 4th argument is defined and is not a HASH
+ if(defined $info->[3] && ref $info->[3] ne 'HASH') {
+ warn "4th argument of DBI connect info is defined "
+ . " but is not a hashref!";
+ }
+
+ # Set AutoCommit to 1 if not specified manually
+ else {
+ $info->[3] ||= {};
+ if(!defined $info->[3]->{AutoCommit}) {
+ $info->[3]->{AutoCommit} = 1;
+ }
+ }
}
$self->_connect_info($info);
Modified: branches/DBIx-Class/bulk_create/t/lib/DBICTest.pm
===================================================================
--- branches/DBIx-Class/bulk_create/t/lib/DBICTest.pm 2007-05-18 10:37:41 UTC (rev 3323)
+++ branches/DBIx-Class/bulk_create/t/lib/DBICTest.pm 2007-05-18 12:24:00 UTC (rev 3324)
@@ -55,12 +55,18 @@
my $dbuser = $ENV{"DBICTEST_DBUSER"} || '';
my $dbpass = $ENV{"DBICTEST_DBPASS"} || '';
- my $compose_method = ($args{compose_connection}
- ? 'compose_connection'
- : 'compose_namespace');
+ my $schema;
- my $schema = DBICTest::Schema->$compose_method('DBICTest')
- ->connect($dsn, $dbuser, $dbpass, { AutoCommit => 1 });
+ my @connect_info = ($dsn, $dbuser, $dbpass, { AutoCommit => 1 });
+
+ if ($args{compose_connection}) {
+ $schema = DBICTest::Schema->compose_connection(
+ 'DBICTest', @connect_info
+ );
+ } else {
+ $schema = DBICTest::Schema->compose_namespace('DBICTest')
+ ->connect(@connect_info);
+ }
$schema->storage->on_connect_do(['PRAGMA synchronous = OFF']);
if ( !$args{no_deploy} ) {
__PACKAGE__->deploy_schema( $schema );
More information about the Bast-commits
mailing list