[Bast-commits] r5581 - in DBIx-Class/0.08/trunk: . lib/DBIx lib/DBIx/Class lib/DBIx/Class/InflateColumn lib/DBIx/Class/Manual lib/DBIx/Class/Relationship lib/DBIx/Class/Storage lib/DBIx/Class/Storage/DBI/Oracle lib/DBIx/Class/Storage/DBI/Replicated lib/SQL/Translator/Parser/DBIx t t/lib t/lib/DBIC t/lib/DBICTest

jmmills at dev.catalyst.perl.org jmmills at dev.catalyst.perl.org
Fri Feb 20 06:45:44 GMT 2009


Author: jmmills
Date: 2009-02-20 06:45:44 +0000 (Fri, 20 Feb 2009)
New Revision: 5581

Modified:
   DBIx-Class/0.08/trunk/
   DBIx-Class/0.08/trunk/Changes
   DBIx-Class/0.08/trunk/Makefile.PL
   DBIx-Class/0.08/trunk/lib/DBIx/Class.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/FAQ.pod
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Accessor.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm
   DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
   DBIx-Class/0.08/trunk/t/66relationship.t
   DBIx-Class/0.08/trunk/t/72pg.t
   DBIx-Class/0.08/trunk/t/76joins.t
   DBIx-Class/0.08/trunk/t/86sqlt.t
   DBIx-Class/0.08/trunk/t/bindtype_columns.t
   DBIx-Class/0.08/trunk/t/lib/DBIC/SqlMakerTest.pm
   DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm
   DBIx-Class/0.08/trunk/t/lib/sqlite.sql
Log:
 r6402 at ofelia (orig r5437):  jmmills | 2009-02-09 21:30:07 -0800
 Merged trunk in to rt_bug_t41083 branch via svk merge.
 



Property changes on: DBIx-Class/0.08/trunk
___________________________________________________________________
Name: svk:merge
   - 168d5346-440b-0410-b799-f706be625ff1:/DBIx-Class-current:2207
462d4d0c-b505-0410-bf8e-ce8f877b3390:/local/bast/DBIx-Class:3159
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/DBIx-Class/0.08/branches/resultsetcolumn_custom_columns:5160
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/DBIx-Class/0.08/branches/sqla_1.50_compat:5414
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/DBIx-Class/0.08/trunk:5635
9c88509d-e914-0410-b01c-b9530614cbfe:/local/DBIx-Class:32260
9c88509d-e914-0410-b01c-b9530614cbfe:/local/DBIx-Class-CDBICompat:54993
9c88509d-e914-0410-b01c-b9530614cbfe:/vendor/DBIx-Class:31122
ab17426e-7cd3-4704-a2a2-80b7c0a611bb:/local/dbic_trunk:10772
bd5ac9a7-f185-4d95-9186-dbb8b392a572:/local/os/bast/DBIx-Class/0.08/trunk:2798
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/belongs_to_null_col_fix:5244
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/cdbicompat_integration:4160
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/complex_join_rels:4589
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/file_column:3920
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/multi_stuff:5565
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/on_disconnect_do:3694
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/oracle_sequence:4173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/parser_fk_index:4485
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/replication_dedux:4600
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/rt_bug_41083:5436
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/savepoints:4223
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/sqla_1.50_compat:5321
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/storage-ms-access:4142
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/subquery:5574
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/versioned_enhancements:4125
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/versioning:4578
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-C3:318
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-current:2222
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/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/many_to_many:2025
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/sqlt_tests_refactor:2043
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class:3606
fe160bb6-dc1c-0410-9f2b-d64a711b54a5:/local/DBIC-trunk-0.08:10510
   + 168d5346-440b-0410-b799-f706be625ff1:/DBIx-Class-current:2207
462d4d0c-b505-0410-bf8e-ce8f877b3390:/local/bast/DBIx-Class:3159
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/DBIx-Class/0.08/branches/resultsetcolumn_custom_columns:5160
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/DBIx-Class/0.08/branches/sqla_1.50_compat:5414
4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/DBIx-Class/0.08/trunk:5635
9c88509d-e914-0410-b01c-b9530614cbfe:/local/DBIx-Class:32260
9c88509d-e914-0410-b01c-b9530614cbfe:/local/DBIx-Class-CDBICompat:54993
9c88509d-e914-0410-b01c-b9530614cbfe:/vendor/DBIx-Class:31122
ab17426e-7cd3-4704-a2a2-80b7c0a611bb:/local/dbic_trunk:10772
bd5ac9a7-f185-4d95-9186-dbb8b392a572:/local/os/bast/DBIx-Class/0.08/trunk:2798
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/belongs_to_null_col_fix:5244
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/cdbicompat_integration:4160
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/complex_join_rels:4589
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/file_column:3920
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/multi_stuff:5565
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/on_disconnect_do:3694
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/oracle_sequence:4173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/parser_fk_index:4485
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/replication_dedux:4600
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/rt_bug_41083:5437
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/savepoints:4223
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/sqla_1.50_compat:5321
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/storage-ms-access:4142
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/subquery:5574
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/versioned_enhancements:4125
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/versioning:4578
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-C3:318
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-current:2222
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/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/many_to_many:2025
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/sqlt_tests_refactor:2043
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class:3606
fe160bb6-dc1c-0410-9f2b-d64a711b54a5:/local/DBIC-trunk-0.08:10510

Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/Changes	2009-02-20 06:45:44 UTC (rev 5581)
@@ -1,15 +1,5 @@
 Revision history for DBIx::Class
-        - Add DBIC_MULTICREATE_DEBUG env var (undocumented, quasi-internal)
-        - Fix up multi-create to:
-          - correctly propagate columns loaded during multi-insert of rels
-          - not try and insert things tagged on via new_related unless required
         - Possible to set locale in IC::DateTime extra => {} config
-        - Calling the accessor of a belongs_to when the foreign_key
-          was NULL and the row was not stored would unexpectedly fail (groditi)
-        - Split sql statements for deploy only if SQLT::Producer returned a scalar
-          containing all statements to be executed
-        - Add as_query() for ResultSet and ResultSetColumn. This makes subqueries
-          possible. See the Cookbook for details. (robkinyon, michaelr)
 
 0.08099_06 2009-01-23 07:30:00 (UTC)
         - Allow a scalarref to be supplied to the 'from' resultset attribute
@@ -29,7 +19,6 @@
         - PG array datatype supported with SQLA >= 1.50
         - insert should use store_column, not set_column to avoid marking
           clean just-stored values as dirty. New test for this (groditi)
-        - regression test for source_name (groditi)
 
 0.08099_05 2008-10-30 21:30:00 (UTC)
         - Rewritte of Storage::DBI::connect_info(), extended with an

Modified: DBIx-Class/0.08/trunk/Makefile.PL
===================================================================

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
===================================================================

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Cookbook.pod	2009-02-20 06:45:44 UTC (rev 5581)
@@ -1407,16 +1407,12 @@
 
   $resultset->search(
     {
-      numbers => \[ '= ?', [numbers => [1, 2, 3]] ]
+      numbers => \[ '= ?', [1, 2, 3] ]
     }
   );
 
 See L<SQL::Abstract/array_datatypes> and L<SQL::Abstract/Literal SQL with
-placeholders and bind values (subqueries)> for more explanation. Note that
-L<DBIx::Class> sets L<SQL::Abstract/bindtype> to C<columns>, so you must pass
-the bind values (the C<[1, 2, 3]> arrayref in the above example) wrapped in
-arrayrefs together with the column name, like this: C<< [column_name => value]
->>.
+placeholders and bind values (subqueries)> for more explanation.
 
 =head1 BOOTSTRAPPING/MIGRATING 
 

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/FAQ.pod
===================================================================

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Accessor.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Accessor.pm	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Accessor.pm	2009-02-20 06:45:44 UTC (rev 5581)
@@ -31,7 +31,6 @@
           $rel_info->{cond}, $rel, $self
         );
         if ($rel_info->{attrs}->{undef_on_null_fk}){
-          return unless ref($cond) eq 'HASH';
           return if grep { not defined } values %$cond;
         }
         my $val = $self->find_related($rel, {}, {});

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
===================================================================

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/Pool.pm	2009-02-20 06:45:44 UTC (rev 5581)
@@ -187,19 +187,17 @@
 
 sub _safely_ensure_connected {
   my ($self, $replicant, @args) = @_;
-  eval {
-    $replicant->ensure_connected(@args);
-  }; 
-  if ($@) {
+  my $return; eval {
+    $return = $replicant->ensure_connected(@args);
+  }; if ($@) {
     $replicant
-      ->debugobj
-      ->print(
-        sprintf( "Exception trying to ->ensure_connected for replicant %s, error is %s",
-          $replicant->_dbi_connect_info->[0], $@)
+        ->debugobj
+        ->print(
+            sprintf( "Exception trying to ->ensure_connected for replicant %s, error is %s",
+                $self->_dbi_connect_info->[0], $@)
         );
-  	return;
   }
-  return 1;
+  return $return;
 }
 
 =head2 connected_replicants

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class.pm	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class.pm	2009-02-20 06:45:44 UTC (rev 5581)
@@ -291,8 +291,6 @@
 
 rjbs: Ricardo Signes <rjbs at cpan.org>
 
-robkinyon: Rob Kinyon <rkinyon at cpan.org>
-
 sc_: Just Another Perl Hacker
 
 scotty: Scotty Allen <scotty at scottyallen.com>

Modified: DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================

Modified: DBIx-Class/0.08/trunk/t/66relationship.t
===================================================================
--- DBIx-Class/0.08/trunk/t/66relationship.t	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/t/66relationship.t	2009-02-20 06:45:44 UTC (rev 5581)
@@ -8,7 +8,7 @@
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 69;
+plan tests => 74;
 
 # has_a test
 my $cd = $schema->resultset("CD")->find(4);

Modified: DBIx-Class/0.08/trunk/t/72pg.t
===================================================================
--- DBIx-Class/0.08/trunk/t/72pg.t	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/t/72pg.t	2009-02-20 06:45:44 UTC (rev 5581)
@@ -153,7 +153,7 @@
   my $count;
   lives_ok {
     $count = $schema->resultset('ArrayTest')->search({
-      arrayfield => \[ '= ?' => [arrayfield => [3, 4]] ],   #TODO anything less ugly than this?
+      arrayfield => \[ '= ?' => [3, 4] ],   #TODO anything less ugly than this?
     })->count;
   } 'comparing arrayref to pg array data does not blow up';
   is($count, 1, 'comparing arrayref to pg array data gives correct result');

Modified: DBIx-Class/0.08/trunk/t/76joins.t
===================================================================

Modified: DBIx-Class/0.08/trunk/t/86sqlt.t
===================================================================
--- DBIx-Class/0.08/trunk/t/86sqlt.t	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/t/86sqlt.t	2009-02-20 06:45:44 UTC (rev 5581)
@@ -10,7 +10,7 @@
 
 my $schema = DBICTest->init_schema;
 
-plan tests => 133;
+plan tests => 132;
 
 my $translator = SQL::Translator->new( 
   parser_args => {
@@ -29,7 +29,7 @@
     $schema->source('Track')->sqlt_deploy_callback(sub {
       my ($self, $sqlt_table) = @_;
 
-      if ($schema->storage->sqlt_type eq 'SQLite' ) {
+      if ($sqlt_table->schema->translator->producer_type =~ /SQLite$/ ) {
         $sqlt_table->add_index( name => 'track_title', fields => ['title'] )
           or die $sqlt_table->error;
       }

Modified: DBIx-Class/0.08/trunk/t/bindtype_columns.t
===================================================================
--- DBIx-Class/0.08/trunk/t/bindtype_columns.t	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/t/bindtype_columns.t	2009-02-20 06:45:44 UTC (rev 5581)
@@ -21,6 +21,8 @@
     $dbh->do('DROP TABLE IF EXISTS bindtype_test');
 
     # the blob/clob are for reference only, will be useful when we switch to SQLT and can test Oracle along the way
+
+    # the blob/clob are for reference only, will be useful when we switch to SQLT and can test Oracle along the way
     $dbh->do(qq[
         CREATE TABLE bindtype_test 
         (
@@ -32,57 +34,21 @@
     ],{ RaiseError => 1, PrintError => 1 });
 }
 
-my $big_long_string	= "\x00\x01\x02 abcd" x 125000;
-
-my $new;
-# test inserting a row
-{
-  $new = $schema->resultset('BindType')->create({ bytea => $big_long_string });
-
-  ok($new->id, "Created a bytea row");
-  is($new->bytea, 	$big_long_string, "Set the blob correctly.");
-}
-
 # test retrieval of the bytea column
 {
   my $row = $schema->resultset('BindType')->find({ id => $new->id });
   is($row->get_column('bytea'), $big_long_string, "Created the blob correctly.");
 }
 
-TODO: {
-  local $TODO =
-    'Passing bind attributes to $sth->bind_param() should be implemented (it only works in $storage->insert ATM)';
+my $new = $schema->resultset('BindType')->create({ bytea => $big_long_string });
 
-  my $rs = $schema->resultset('BindType')->search({ bytea => $big_long_string });
+ok($new->id, "Created a bytea row");
+is($new->bytea, 	$big_long_string, "Set the blob correctly.");
 
-  # search on the bytea column (select)
-  {
-    my $row = $rs->first;
-    is($row ? $row->id : undef, $new->id, "Found the row searching on the bytea column.");
-  }
+my $rs = $schema->resultset('BindType')->find({ id => $new->id });
 
-  # search on the bytea column (update)
-  {
-    my $new_big_long_string = $big_long_string . "2";
-    $schema->txn_do(sub {
-      $rs->update({ bytea => $new_big_long_string });
-      my $row = $schema->resultset('BindType')->find({ id => $new->id });
-      is($row ? $row->get_column('bytea') : undef, $new_big_long_string,
-        "Updated the row correctly (searching on the bytea column)."
-      );
-      $schema->txn_rollback;
-    });
-  }
+is($rs->get_column('bytea'), $big_long_string, "Created the blob correctly.");
 
-  # search on the bytea column (delete)
-  {
-    $schema->txn_do(sub {
-      $rs->delete;
-      my $row = $schema->resultset('BindType')->find({ id => $new->id });
-      is($row, undef, "Deleted the row correctly (searching on the bytea column).");
-      $schema->txn_rollback;
-    });
-  }
-}
+$dbh->do("DROP TABLE bindtype_test");
 
 $dbh->do("DROP TABLE bindtype_test");

Modified: DBIx-Class/0.08/trunk/t/lib/DBIC/SqlMakerTest.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBIC/SqlMakerTest.pm	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/t/lib/DBIC/SqlMakerTest.pm	2009-02-20 06:45:44 UTC (rev 5581)
@@ -7,11 +7,8 @@
 
 our @EXPORT = qw/
   &is_same_sql_bind
-  &is_same_sql
-  &is_same_bind
   &eq_sql
   &eq_bind
-  &eq_sql_bind
 /;
 
 
@@ -42,59 +39,19 @@
     $tb->ok($same_sql && $same_bind, $msg);
 
     if (!$same_sql) {
-      _sql_differ_diag($sql1, $sql2);
+      $tb->diag("SQL expressions differ\n"
+        . "     got: $sql1\n"
+        . "expected: $sql2\n"
+      );
     }
     if (!$same_bind) {
-      _bind_differ_diag($bind_ref1, $bind_ref2);
+      $tb->diag("BIND values differ\n"
+        . "     got: " . Dumper($bind_ref1)
+        . "expected: " . Dumper($bind_ref2)
+      );
     }
   }
 
-  sub is_same_sql
-  {
-    my ($sql1, $sql2, $msg) = @_;
-
-    my $same_sql = eq_sql($sql1, $sql2);
-
-    $tb->ok($same_sql, $msg);
-
-    if (!$same_sql) {
-      _sql_differ_diag($sql1, $sql2);
-    }
-  }
-
-  sub is_same_bind
-  {
-    my ($bind_ref1, $bind_ref2, $msg) = @_;
-
-    my $same_bind = eq_bind($bind_ref1, $bind_ref2);
-
-    $tb->ok($same_bind, $msg);
-
-    if (!$same_bind) {
-      _bind_differ_diag($bind_ref1, $bind_ref2);
-    }
-  }
-
-  sub _sql_differ_diag
-  {
-    my ($sql1, $sql2) = @_;
-
-    $tb->diag("SQL expressions differ\n"
-      . "     got: $sql1\n"
-      . "expected: $sql2\n"
-    );
-  }
-
-  sub _bind_differ_diag
-  {
-    my ($bind_ref1, $bind_ref2) = @_;
-
-    $tb->diag("BIND values differ\n"
-      . "     got: " . Dumper($bind_ref1)
-      . "expected: " . Dumper($bind_ref2)
-    );
-  }
-
   sub eq_sql
   {
     my ($left, $right) = @_;
@@ -111,13 +68,6 @@
 
     return eq_deeply($bind_ref1, $bind_ref2);
   }
-
-  sub eq_sql_bind
-  {
-    my ($sql1, $bind_ref1, $sql2, $bind_ref2) = @_;
-
-    return eq_sql($sql1, $sql2) && eq_bind($bind_ref1, $bind_ref2);
-  }
 }
 
 eval "use SQL::Abstract::Test;";
@@ -125,20 +75,14 @@
   # SQL::Abstract::Test available
 
   *is_same_sql_bind = \&SQL::Abstract::Test::is_same_sql_bind;
-  *is_same_sql = \&SQL::Abstract::Test::is_same_sql;
-  *is_same_bind = \&SQL::Abstract::Test::is_same_bind;
   *eq_sql = \&SQL::Abstract::Test::eq_sql;
   *eq_bind = \&SQL::Abstract::Test::eq_bind;
-  *eq_sql_bind = \&SQL::Abstract::Test::eq_sql_bind;
 } else {
   # old SQL::Abstract
 
   *is_same_sql_bind = \&DBIC::SqlMakerTest::SQLATest::is_same_sql_bind;
-  *is_same_sql = \&DBIC::SqlMakerTest::SQLATest::is_same_sql;
-  *is_same_bind = \&DBIC::SqlMakerTest::SQLATest::is_same_bind;
   *eq_sql = \&DBIC::SqlMakerTest::SQLATest::eq_sql;
   *eq_bind = \&DBIC::SqlMakerTest::SQLATest::eq_bind;
-  *eq_sql_bind = \&DBIC::SqlMakerTest::SQLATest::eq_sql_bind;
 }
 
 
@@ -187,28 +131,6 @@
 Compares given and expected pairs of C<($sql, \@bind)>, and calls
 L<Test::Builder/ok> on the result, with C<$test_msg> as message.
 
-=head2 is_same_sql
-
-  is_same_sql(
-    $given_sql,
-    $expected_sql,
-    $test_msg
-  );
-
-Compares given and expected SQL statement, and calls L<Test::Builder/ok> on the
-result, with C<$test_msg> as message.
-
-=head2 is_same_bind
-
-  is_same_bind(
-    \@given_bind, 
-    \@expected_bind,
-    $test_msg
-  );
-
-Compares given and expected bind value lists, and calls L<Test::Builder/ok> on
-the result, with C<$test_msg> as message.
-
 =head2 eq_sql
 
   my $is_same = eq_sql($given_sql, $expected_sql);
@@ -221,17 +143,7 @@
 
 Compares two lists of bind values. Returns true IFF their values are the same.
 
-=head2 eq_sql_bind
 
-  my $is_same = eq_sql_bind(
-    $given_sql, \@given_bind,
-    $expected_sql, \@expected_bind
-  );
-
-Compares the two SQL statements and the two lists of bind values. Returns true
-IFF they are equivalent and the bind values are the same.
-
-
 =head1 SEE ALSO
 
 L<SQL::Abstract::Test>, L<Test::More>, L<Test::Builder>.

Modified: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema.pm
===================================================================

Modified: DBIx-Class/0.08/trunk/t/lib/sqlite.sql
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/sqlite.sql	2009-02-20 06:43:42 UTC (rev 5580)
+++ DBIx-Class/0.08/trunk/t/lib/sqlite.sql	2009-02-20 06:45:44 UTC (rev 5581)
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Sat Jan 24 19:42:15 2009
+-- Created on Sat Jan 17 19:40:47 2009
 -- 
 BEGIN TRANSACTION;
 
@@ -38,18 +38,6 @@
 CREATE INDEX cd_artwork_idx_cd_id_cd_artwor ON cd_artwork (cd_id);
 
 --
--- Table: artwork_to_artist
---
-CREATE TABLE artwork_to_artist (
-  artwork_cd_id integer NOT NULL,
-  artist_id integer NOT NULL,
-  PRIMARY KEY (artwork_cd_id, artist_id)
-);
-
-CREATE INDEX artwork_to_artist_idx_artist_id_artwork_to_arti ON artwork_to_artist (artist_id);
-CREATE INDEX artwork_to_artist_idx_artwork_cd_id_artwork_to_ ON artwork_to_artist (artwork_cd_id);
-
---
 -- Table: bindtype_test
 --
 CREATE TABLE bindtype_test (




More information about the Bast-commits mailing list