[Bast-commits] r7660 - in DBIx-Class/0.08/branches/prefetch: .
examples/Schema lib/DBIx lib/DBIx/Class lib/DBIx/Class/Manual
lib/DBIx/Class/Storage lib/DBIx/Class/Storage/DBI t t/cdbi
t/lib/DBICTest/Schema t/prefetch t/relationship
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Mon Sep 14 21:19:01 GMT 2009
Author: ribasushi
Date: 2009-09-14 21:19:00 +0000 (Mon, 14 Sep 2009)
New Revision: 7660
Modified:
DBIx-Class/0.08/branches/prefetch/
DBIx-Class/0.08/branches/prefetch/Changes
DBIx-Class/0.08/branches/prefetch/Makefile.PL
DBIx-Class/0.08/branches/prefetch/examples/Schema/insertdb.pl
DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class.pm
DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Manual/Example.pod
DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSetColumn.pm
DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSource.pm
DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/Cursor.pm
DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/MSSQL.pm
DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/TxnScopeGuard.pm
DBIx-Class/0.08/branches/prefetch/t/60core.t
DBIx-Class/0.08/branches/prefetch/t/81transactions.t
DBIx-Class/0.08/branches/prefetch/t/88result_set_column.t
DBIx-Class/0.08/branches/prefetch/t/cdbi/13-constraint.t
DBIx-Class/0.08/branches/prefetch/t/lib/DBICTest/Schema/Artist.pm
DBIx-Class/0.08/branches/prefetch/t/prefetch/via_search_related.t
DBIx-Class/0.08/branches/prefetch/t/relationship/after_update.t
DBIx-Class/0.08/branches/prefetch/t/relationship/doesnt_exist.t
DBIx-Class/0.08/branches/prefetch/t/relationship/update_or_create_single.t
Log:
r7606 at Thesaurus (orig r7603): frew | 2009-09-08 20:13:29 +0200
Turn IDENTITY_INSERT back off after inserts
r7616 at Thesaurus (orig r7613): ribasushi | 2009-09-09 14:16:12 +0200
Fix warning
r7617 at Thesaurus (orig r7614): ribasushi | 2009-09-09 14:42:49 +0200
Really sanify exception text
r7624 at Thesaurus (orig r7621): mo | 2009-09-10 18:53:32 +0200
added test to make sure that store_column is called even for non-dirty columns
r7625 at Thesaurus (orig r7622): bluefeet | 2009-09-10 19:03:21 +0200
Fix RSC->reset() to no longer return $self, which fixes Cursor::Cached + RSC.
r7626 at Thesaurus (orig r7623): ribasushi | 2009-09-10 19:32:03 +0200
The real fix
r7627 at Thesaurus (orig r7624): matthewt | 2009-09-11 02:33:17 +0200
make it clear that we are not supposed to have optional deps
r7628 at Thesaurus (orig r7625): ribasushi | 2009-09-11 06:30:03 +0200
Changes so far
r7629 at Thesaurus (orig r7626): ribasushi | 2009-09-11 06:39:45 +0200
Fix borked makefile
r7630 at Thesaurus (orig r7627): ribasushi | 2009-09-11 15:39:42 +0200
Fixed minor problem with txn scope guard - rollback exceptions were never reported
r7632 at Thesaurus (orig r7629): ribasushi | 2009-09-11 23:06:54 +0200
Extend prefetch tests
r7633 at Thesaurus (orig r7630): ribasushi | 2009-09-11 23:13:45 +0200
Reverting http://dev.catalyst.perl.org/svnweb/bast/revision?rev=4278 - it seems to pass fine now
r7634 at Thesaurus (orig r7631): ribasushi | 2009-09-12 00:15:50 +0200
Add single() ro RSC
r7635 at Thesaurus (orig r7632): ribasushi | 2009-09-12 00:44:01 +0200
This is how the txnguard should really work
r7636 at Thesaurus (orig r7633): ribasushi | 2009-09-12 00:58:21 +0200
Fix borked example
r7637 at Thesaurus (orig r7634): ribasushi | 2009-09-12 00:58:58 +0200
scopeguard almost done
r7638 at Thesaurus (orig r7635): brunov | 2009-09-12 01:25:12 +0200
Update DBIx::Class::Manual::Example.pod to reflect previous changes in examples/Schema/insertdb.pl
r7639 at Thesaurus (orig r7636): brunov | 2009-09-12 01:27:17 +0200
Added Bruno Vecchi to the Contributors section in DBIx/Class.pm
r7640 at Thesaurus (orig r7637): ribasushi | 2009-09-12 01:31:16 +0200
Final scopeguard tweak (?)
r7644 at Thesaurus (orig r7641): ribasushi | 2009-09-12 12:46:51 +0200
Even better localization of $@, and don't use Test::Warn for the time being, as something is freaking out Sub::UpLevel
r7670 at Thesaurus (orig r7659): ribasushi | 2009-09-14 18:24:44 +0200
Someone claimed this is a problem...
Property changes on: DBIx-Class/0.08/branches/prefetch
___________________________________________________________________
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/cookbook_fixes:7657
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:7237
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_column_attr:10946
ab17426e-7cd3-4704-a2a2-80b7c0a611bb:/local/dbic_trunk:11788
bd5ac9a7-f185-4d95-9186-dbb8b392a572:/local/os/bast/DBIx-Class/0.08/trunk:2798
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/_abandoned_but_possibly_useful/table_name_ref:7266
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/autocast:7418
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/column_attr:5074
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/complex_join_rels:4589
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/connect_info_hash:7435
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/cookbook_fixes:7479
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/count_distinct:6218
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/count_rs:6741
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/diamond_relationships:6310
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/discard_changes_replication_fix:7252
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/file_column:3920
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/fix-update-and-delete-as_query:6162
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/grouped_has_many_join:7382
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/grouped_prefetch:6885
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/joined_count:6323
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mc_fixes:6645
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mssql_money_type:7096
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mssql_storage_minor_refactor:7210
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mssql_top_fixes:6971
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/multi_stuff:5565
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/multicreate_fixes:7275
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mysql_ansi:7175
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mystery_join:6589
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/new_replication_transaction_fixup:7058
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/on_connect_call:6854
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-tweaks:6222
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/oracle_sequence:4173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/order_by_refactor:6475
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/parser_fk_index:4485
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/pg_unqualified_schema:7566
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/prefetch_limit:6724
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/prefetch_redux:7206
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/reduce_pings:7261
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/replication_dedux:4600
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/rsrc_in_storage:6577
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/search_related_prefetch:6818
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/storage-tweaks:6262
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/subclassed_rsset:5930
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/subquery:5617
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/syb_connected:6919
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/sybase:5651
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/sybase_mssql:6125
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/table_name_ref:7132
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/top_limit_altfix:6429
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/type_aware_update:6619
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/unresolvable_prefetch:6949
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:/DBIx-Class/0.08/branches/views:5585
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/tags/0.08108_prerelease_please_do_not_pull_into_it:7008
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/tags/pre_0.08109_please_do_not_merge:7336
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/trunk:7598
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/cookbook_fixes:7657
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:7237
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_column_attr:10946
ab17426e-7cd3-4704-a2a2-80b7c0a611bb:/local/dbic_trunk:11788
bd5ac9a7-f185-4d95-9186-dbb8b392a572:/local/os/bast/DBIx-Class/0.08/trunk:2798
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/_abandoned_but_possibly_useful/table_name_ref:7266
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/autocast:7418
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/column_attr:5074
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/complex_join_rels:4589
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/connect_info_hash:7435
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/cookbook_fixes:7479
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/count_distinct:6218
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/count_rs:6741
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/diamond_relationships:6310
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/discard_changes_replication_fix:7252
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/file_column:3920
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/fix-update-and-delete-as_query:6162
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/grouped_has_many_join:7382
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/grouped_prefetch:6885
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/joined_count:6323
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mc_fixes:6645
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mssql_money_type:7096
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mssql_storage_minor_refactor:7210
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mssql_top_fixes:6971
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/multi_stuff:5565
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/multicreate_fixes:7275
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mysql_ansi:7175
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/mystery_join:6589
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/new_replication_transaction_fixup:7058
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/on_connect_call:6854
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-tweaks:6222
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/oracle_sequence:4173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/order_by_refactor:6475
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/parser_fk_index:4485
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/pg_unqualified_schema:7566
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/prefetch_limit:6724
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/prefetch_redux:7206
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/reduce_pings:7261
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/replication_dedux:4600
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/rsrc_in_storage:6577
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/search_related_prefetch:6818
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/storage-tweaks:6262
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/subclassed_rsset:5930
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/subquery:5617
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/syb_connected:6919
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/sybase:5651
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/sybase_mssql:6125
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/table_name_ref:7132
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/top_limit_altfix:6429
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/type_aware_update:6619
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/unresolvable_prefetch:6949
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:/DBIx-Class/0.08/branches/views:5585
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/tags/0.08108_prerelease_please_do_not_pull_into_it:7008
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/tags/pre_0.08109_please_do_not_merge:7336
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/trunk:7659
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/branches/prefetch/Changes
===================================================================
--- DBIx-Class/0.08/branches/prefetch/Changes 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/Changes 2009-09-14 21:19:00 UTC (rev 7660)
@@ -1,5 +1,19 @@
Revision history for DBIx::Class
+ - Remove the recommends from Makefile.PL, DBIx::Class is not
+ supposed to have optional dependencies. ever.
+ - Mangle the DBIx/Class.pm POD to be more clear about
+ copyright and license
+ - Put back PG's multiple autoinc per table support, accidentally
+ dropped during the serial-autodetection rwrite
+ - Make sure ResultSetColumn does not depend on the (undefined)
+ return value of ->cursor->reset()
+ - Add single() to ResultSetColumn (same semantics as ResultSet)
+ - Make sure to turn off IDENTITY_INSERT after insert() on MSSQL
+ tables that needed it
+ - More informative exception on failing _resolve_relationship
+ - Fix unreported rollback exceptions in TxnScopeGuard
+
0.08111 2009-09-06 21:58:00 (UTC)
- The hashref to connection_info now accepts a 'dbh_maker'
coderef, allowing better intergration with Catalyst
Modified: DBIx-Class/0.08/branches/prefetch/Makefile.PL
===================================================================
--- DBIx-Class/0.08/branches/prefetch/Makefile.PL 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/Makefile.PL 2009-09-14 21:19:00 UTC (rev 7660)
@@ -5,6 +5,8 @@
use 5.006001; # delete this line if you want to send patches for earlier.
+# ****** DO NOT ADD OPTIONAL DEPENDENCIES. EVER. --mst ******
+
name 'DBIx-Class';
perl_version '5.006001';
all_from 'lib/DBIx/Class.pm';
@@ -55,8 +57,6 @@
# when changing also adjust $DBIx::Class::minimum_sqlt_version
my $sqlt_recommends = '0.11002';
-recommends 'SQL::Translator' => $sqlt_recommends;
-
my %force_requires_if_author = (
%replication_requires,
Modified: DBIx-Class/0.08/branches/prefetch/examples/Schema/insertdb.pl
===================================================================
--- DBIx-Class/0.08/branches/prefetch/examples/Schema/insertdb.pl 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/examples/Schema/insertdb.pl 2009-09-14 21:19:00 UTC (rev 7660)
@@ -23,10 +23,10 @@
my @cds;
foreach my $lp (keys %albums) {
- my $artist = $schema->resultset('Artist')->search({
+ my $artist = $schema->resultset('Artist')->find({
name => $albums{$lp}
});
- push @cds, [$lp, $artist->first];
+ push @cds, [$lp, $artist->id];
}
$schema->populate('Cd', [
@@ -47,10 +47,10 @@
my @tracks;
foreach my $track (keys %tracks) {
- my $cdname = $schema->resultset('Cd')->search({
+ my $cd = $schema->resultset('Cd')->find({
title => $tracks{$track},
});
- push @tracks, [$cdname->first, $track];
+ push @tracks, [$cd->id, $track];
}
$schema->populate('Track',[
Modified: DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Manual/Example.pod
===================================================================
--- DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Manual/Example.pod 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Manual/Example.pod 2009-09-14 21:19:00 UTC (rev 7660)
@@ -155,10 +155,10 @@
my @cds;
foreach my $lp (keys %albums) {
- my $artist = $schema->resultset('Artist')->search({
+ my $artist = $schema->resultset('Artist')->find({
name => $albums{$lp}
});
- push @cds, [$lp, $artist->first];
+ push @cds, [$lp, $artist->id];
}
$schema->populate('Cd', [
@@ -179,10 +179,10 @@
my @tracks;
foreach my $track (keys %tracks) {
- my $cdname = $schema->resultset('Cd')->search({
+ my $cdname = $schema->resultset('Cd')->find({
title => $tracks{$track},
});
- push @tracks, [$cdname->first, $track];
+ push @tracks, [$cdname->id, $track];
}
$schema->populate('Track',[
Modified: DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSetColumn.pm
===================================================================
--- DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSetColumn.pm 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSetColumn.pm 2009-09-14 21:19:00 UTC (rev 7660)
@@ -125,7 +125,10 @@
sub next {
my $self = shift;
+
+ # using cursor so we don't inflate anything
my ($row) = $self->_resultset->cursor->next;
+
return $row;
}
@@ -149,6 +152,8 @@
sub all {
my $self = shift;
+
+ # using cursor so we don't inflate anything
return map { $_->[0] } $self->_resultset->cursor->all;
}
@@ -194,10 +199,41 @@
sub first {
my $self = shift;
- my ($row) = $self->_resultset->cursor->reset->next;
+
+ # using cursor so we don't inflate anything
+ $self->_resultset->cursor->reset;
+ my ($row) = $self->_resultset->cursor->next;
+
return $row;
}
+=head2 single
+
+=over 4
+
+=item Arguments: none
+
+=item Return Value: $value
+
+=back
+
+Much like L<DBIx::Class::ResultSet/single> fetches one and only one column
+value using the cursor directly. If additional rows are present a warning
+is issued before discarding the cursor.
+
+=cut
+
+sub single {
+ my $self = shift;
+
+ my $attrs = $self->_resultset->_resolved_attrs;
+ my ($row) = $self->_resultset->result_source->storage->select_single(
+ $attrs->{from}, $attrs->{select}, $attrs->{where}, $attrs
+ );
+
+ return $row;
+}
+
=head2 min
=over 4
@@ -395,7 +431,7 @@
#
# Returns the underlying resultset. Creates it from the parent resultset if
# necessary.
-#
+#
sub _resultset {
my $self = shift;
Modified: DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSource.pm
===================================================================
--- DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSource.pm 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/ResultSource.pm 2009-09-14 21:19:00 UTC (rev 7660)
@@ -1316,10 +1316,14 @@
#warn "$self $k $for $v";
unless ($for->has_column_loaded($v)) {
if ($for->in_storage) {
- $self->throw_exception(
- "Column ${v} not loaded or not passed to new() prior to insert()"
- ." on ${for} trying to resolve relationship (maybe you forgot "
- ."to call ->discard_changes to get defaults from the db)"
+ $self->throw_exception(sprintf
+ 'Unable to resolve relationship from %s to %s: column %s.%s not '
+ . 'loaded from storage (or not passed to new() prior to insert()). '
+ . 'Maybe you forgot to call ->discard_changes to get defaults from the db.',
+
+ $for->result_source->source_name,
+ $as,
+ $as, $v,
);
}
return $UNRESOLVABLE_CONDITION;
@@ -1440,7 +1444,7 @@
$p = $p->{$_} for (@$pref_path, $pre);
$self->throw_exception (
- "Unable to resolve prefetch $pre - join alias map does not contain an entry for path: "
+ "Unable to resolve prefetch '$pre' - join alias map does not contain an entry for path: "
. join (' -> ', @$pref_path, $pre)
) if (ref $p->{-join_aliases} ne 'ARRAY' or not @{$p->{-join_aliases}} );
Modified: DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/Cursor.pm
===================================================================
--- DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/Cursor.pm 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/Cursor.pm 2009-09-14 21:19:00 UTC (rev 7660)
@@ -148,6 +148,7 @@
# No need to care about failures here
eval { $self->{sth}->finish if $self->{sth} && $self->{sth}->{Active} };
$self->_soft_reset;
+ return undef;
}
sub _soft_reset {
@@ -156,7 +157,6 @@
delete $self->{sth};
delete $self->{done};
$self->{pos} = 0;
- return $self;
}
sub _check_dbh_gen {
Modified: DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/MSSQL.pm
===================================================================
--- DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-09-14 21:19:00 UTC (rev 7660)
@@ -32,18 +32,38 @@
}
}
+sub _unset_identity_insert {
+ my ($self, $table) = @_;
+
+ my $sql = sprintf (
+ 'SET IDENTITY_INSERT %s OFF',
+ $self->sql_maker->_quote ($table),
+ );
+
+ my $dbh = $self->_get_dbh;
+ $dbh->do ($sql);
+}
+
sub insert_bulk {
my $self = shift;
my ($source, $cols, $data) = @_;
- if (List::Util::first
+ my $is_identity_insert = (List::Util::first
{ $source->column_info ($_)->{is_auto_increment} }
(@{$cols})
- ) {
- $self->_set_identity_insert ($source->name);
+ )
+ ? 1
+ : 0;
+
+ if ($is_identity_insert) {
+ $self->_set_identity_insert ($source->name);
}
$self->next::method(@_);
+
+ if ($is_identity_insert) {
+ $self->_unset_identity_insert ($source->name);
+ }
}
# support MSSQL GUID column types
@@ -83,12 +103,21 @@
$updated_cols->{$guid_col} = $to_insert->{$guid_col} = $new_guid;
}
- if (List::Util::first { $_->{is_auto_increment} } (values %$supplied_col_info) ) {
- $self->_set_identity_insert ($source->name);
+ my $is_identity_insert = (List::Util::first { $_->{is_auto_increment} } (values %$supplied_col_info) )
+ ? 1
+ : 0;
+
+ if ($is_identity_insert) {
+ $self->_set_identity_insert ($source->name);
}
$updated_cols = { %$updated_cols, %{ $self->next::method(@_) } };
+ if ($is_identity_insert) {
+ $self->_unset_identity_insert ($source->name);
+ }
+
+
return $updated_cols;
}
Modified: DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/TxnScopeGuard.pm
===================================================================
--- DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/TxnScopeGuard.pm 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class/Storage/TxnScopeGuard.pm 2009-09-14 21:19:00 UTC (rev 7660)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Carp ();
+use Carp::Clan qw/^DBIx::Class/;
sub new {
my ($class, $storage) = @_;
@@ -24,21 +24,33 @@
return if $dismiss;
my $exception = $@;
- Carp::cluck("A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or an error - bad")
- unless $exception;
+
{
local $@;
+
+ carp 'A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back.'
+ unless $exception;
+
eval { $storage->txn_rollback };
my $rollback_exception = $@;
- if($rollback_exception) {
- my $exception_class = "DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION";
- $storage->throw_exception(
- "Transaction aborted: ${exception}. "
- . "Rollback failed: ${rollback_exception}"
- ) unless $rollback_exception =~ /$exception_class/;
+ if ($rollback_exception && $rollback_exception !~ /DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION/) {
+ if ($exception) {
+ $exception = "Transaction aborted: ${exception} "
+ ."Rollback failed: ${rollback_exception}";
+ }
+ else {
+ carp (join ' ',
+ "********************* ROLLBACK FAILED!!! ********************",
+ "\nA rollback operation failed after the guard went out of scope.",
+ 'This is potentially a disastrous situation, check your data for',
+ "consistency: $rollback_exception"
+ );
+ }
}
}
+
+ $@ = $exception;
}
1;
Modified: DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class.pm 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/lib/DBIx/Class.pm 2009-09-14 21:19:00 UTC (rev 7660)
@@ -262,6 +262,8 @@
bricas: Brian Cassidy <bricas at cpan.org>
+brunov: Bruno Vecchi <vecchi.b at gmail.com>
+
caelum: Rafael Kitover <rkitover at cpan.org>
castaway: Jess Robinson
Modified: DBIx-Class/0.08/branches/prefetch/t/60core.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/60core.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/60core.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -108,6 +108,10 @@
{
ok(my $artist = $schema->resultset('Artist')->create({name => 'store_column test'}));
is($artist->name, 'X store_column test'); # used to be 'X X store...'
+
+ # call store_column even though the column doesn't seem to be dirty
+ ok($artist->update({name => 'X store_column test'}));
+ is($artist->name, 'X X store_column test');
$artist->delete;
}
Modified: DBIx-Class/0.08/branches/prefetch/t/81transactions.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/81transactions.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/81transactions.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -1,23 +1,22 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
+use Test::Warn;
use Test::Exception;
use lib qw(t/lib);
use DBICTest;
my $schema = DBICTest->init_schema();
-plan tests => 64;
-
my $code = sub {
my ($artist, @cd_titles) = @_;
-
+
$artist->create_related('cds', {
title => $_,
year => 2006,
}) foreach (@cd_titles);
-
+
return $artist->cds->all;
};
@@ -258,13 +257,13 @@
name => 'Death Cab for Cutie',
made_up_column => 1,
});
-
+
$guard->commit;
} qr/No such column made_up_column .*? at .*?81transactions.t line \d+/s, "Error propogated okay";
ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
- my $inner_exception;
+ my $inner_exception; # set in inner() below
eval {
outer($schema, 1);
};
@@ -273,14 +272,11 @@
ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
lives_ok (sub {
- my $w;
- local $SIG{__WARN__} = sub { $w = shift };
-
- # The 0 arg says don't die, just let the scope guard go out of scope
- # forcing a txn_rollback to happen
- outer($schema, 0);
-
- like ($w, qr/A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or an error/, 'Out of scope warning detected');
+ warnings_exist ( sub {
+ # The 0 arg says don't die, just let the scope guard go out of scope
+ # forcing a txn_rollback to happen
+ outer($schema, 0);
+ }, qr/A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back./, 'Out of scope warning detected');
ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
}, 'rollback successful withot exception');
@@ -319,3 +315,63 @@
$inner_guard->commit;
}
}
+
+# make sure the guard does not eat exceptions
+{
+ my $schema = DBICTest->init_schema();
+ throws_ok (sub {
+ my $guard = $schema->txn_scope_guard;
+ $schema->resultset ('Artist')->create ({ name => 'bohhoo'});
+
+ $schema->storage->disconnect; # this should freak out the guard rollback
+
+ die 'Deliberate exception';
+ }, qr/Deliberate exception.+Rollback failed/s);
+}
+
+# make sure it warns *big* on failed rollbacks
+{
+ my $schema = DBICTest->init_schema();
+
+ # something is really confusing Test::Warn here, no time to debug
+=begin
+ warnings_exist (
+ sub {
+ my $guard = $schema->txn_scope_guard;
+ $schema->resultset ('Artist')->create ({ name => 'bohhoo'});
+
+ $schema->storage->disconnect; # this should freak out the guard rollback
+ },
+ [
+ qr/A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back./,
+ qr/\*+ ROLLBACK FAILED\!\!\! \*+/,
+ ],
+ 'proper warnings generated on out-of-scope+rollback failure'
+ );
+=cut
+
+ my @want = (
+ qr/A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back./,
+ qr/\*+ ROLLBACK FAILED\!\!\! \*+/,
+ );
+
+ my @w;
+ local $SIG{__WARN__} = sub {
+ if (grep {$_[0] =~ $_} (@want)) {
+ push @w, $_[0];
+ }
+ else {
+ warn $_[0];
+ }
+ };
+ {
+ my $guard = $schema->txn_scope_guard;
+ $schema->resultset ('Artist')->create ({ name => 'bohhoo'});
+
+ $schema->storage->disconnect; # this should freak out the guard rollback
+ }
+
+ is (@w, 2, 'Both expected warnings found');
+}
+
+done_testing;
Modified: DBIx-Class/0.08/branches/prefetch/t/88result_set_column.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/88result_set_column.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/88result_set_column.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -1,15 +1,14 @@
use strict;
-use warnings;
+use warnings;
use Test::More;
+use Test::Warn;
use Test::Exception;
use lib qw(t/lib);
use DBICTest;
my $schema = DBICTest->init_schema();
-plan tests => 20;
-
my $rs = $schema->resultset("CD")->search({}, { order_by => 'cdid' });
my $rs_title = $rs->get_column('title');
@@ -33,6 +32,10 @@
is($rs_year->first, 1999, "first okay");
+warnings_exist (sub {
+ is($rs_year->single, 1999, "single okay");
+}, qr/Query returned more than one row/, 'single warned');
+
# test +select/+as for single column
my $psrs = $schema->resultset('CD')->search({},
{
@@ -94,3 +97,5 @@
[ $rs->get_column ('cdid')->all ],
'prefetch properly collapses amount of rows from get_column',
);
+
+done_testing;
Modified: DBIx-Class/0.08/branches/prefetch/t/cdbi/13-constraint.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/cdbi/13-constraint.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/cdbi/13-constraint.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -95,13 +95,11 @@
}
eval { Film->constrain_column(codirector => Untaint => 'date') };
is $@, '', 'Can constrain with untaint';
+
my $freeaa =
eval { Film->create({ title => "The Freaa", codirector => 'today' }) };
- TODO: {
- local $TODO = "no idea what this is supposed to do";
- is $@, '', "Can create codirector";
- is $freeaa && $freeaa->codirector, '2001-03-03', "Set the codirector";
- }
+ is $@, '', "Can create codirector";
+ is $freeaa && $freeaa->codirector, '2001-03-03', "Set the codirector";
}
__DATA__
Modified: DBIx-Class/0.08/branches/prefetch/t/lib/DBICTest/Schema/Artist.pm
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/lib/DBICTest/Schema/Artist.pm 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/lib/DBICTest/Schema/Artist.pm 2009-09-14 21:19:00 UTC (rev 7660)
@@ -30,7 +30,7 @@
},
);
__PACKAGE__->set_primary_key('artistid');
-__PACKAGE__->add_unique_constraint(['artistid']); # do not remove, part of a test
+__PACKAGE__->add_unique_constraint(artist => ['artistid']); # do not remove, part of a test
__PACKAGE__->mk_classdata('field_name_for', {
artistid => 'primary key',
@@ -71,7 +71,7 @@
sub store_column {
my ($self, $name, $value) = @_;
- $value = 'X '.$value if ($name eq 'name' && $value && $value =~ /store_column test/);
+ $value = 'X '.$value if ($name eq 'name' && $value && $value =~ /(X )?store_column test/);
$self->next::method($name, $value);
}
Modified: DBIx-Class/0.08/branches/prefetch/t/prefetch/via_search_related.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/prefetch/via_search_related.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/prefetch/via_search_related.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -57,34 +57,46 @@
# test where conditions at the root of the related chain
- my $artist_rs = $schema->resultset("Artist")->search({artistid => 11});
+ my $artist_rs = $schema->resultset("Artist")->search({artistid => 2});
+ my $artist = $artist_rs->next;
+ $artist->create_related ('cds', $_) for (
+ {
+ year => 1999, title => 'vague cd', genre => { name => 'vague genre' }
+ },
+ {
+ year => 1999, title => 'vague cd2', genre => { name => 'vague genre' }
+ },
+ );
-
$rs = $artist_rs->search_related('cds')->search_related('genre',
- { 'genre.name' => 'foo' },
+ { 'genre.name' => 'vague genre' },
{ prefetch => 'cds' },
);
- is($rs->all, 0, 'prefetch without distinct (objects)');
- is($rs->count, 0, 'prefetch without distinct (count)');
+ is($rs->all, 1, 'base without distinct (objects)');
+ is($rs->count, 1, 'base without distinct (count)');
+ # artist -> 2 cds -> 2 genres -> 2 cds for each genre = 4
+ is($rs->search_related('cds')->all, 4, 'prefetch without distinct (objects)');
+ is($rs->search_related('cds')->count, 4, 'prefetch without distinct (count)');
-
$rs = $artist_rs->search(undef, {distinct => 1})
->search_related('cds')->search_related('genre',
- { 'genre.name' => 'foo' },
+ { 'genre.name' => 'vague genre' },
);
- is($rs->all, 0, 'distinct without prefetch (objects)');
- is($rs->count, 0, 'distinct without prefetch (count)');
+ is($rs->all, 1, 'distinct without prefetch (objects)');
+ is($rs->count, 1, 'distinct without prefetch (count)');
-
$rs = $artist_rs->search({}, {distinct => 1})
->search_related('cds')->search_related('genre',
- { 'genre.name' => 'foo' },
+ { 'genre.name' => 'vague genre' },
{ prefetch => 'cds' },
);
- is($rs->all, 0, 'distinct with prefetch (objects)');
- is($rs->count, 0, 'distinct with prefetch (count)');
+ is($rs->all, 1, 'distinct with prefetch (objects)');
+ is($rs->count, 1, 'distinct with prefetch (count)');
+ # artist -> 2 cds -> 2 genres -> 2 cds for each genre + distinct = 2
+ is($rs->search_related('cds')->all, 2, 'prefetched distinct with prefetch (objects)');
+ is($rs->search_related('cds')->count, 2, 'prefetched distinct with prefetch (count)');
Modified: DBIx-Class/0.08/branches/prefetch/t/relationship/after_update.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/relationship/after_update.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/relationship/after_update.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -1,7 +1,5 @@
-#!/usr/bin/perl -w
-
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
Modified: DBIx-Class/0.08/branches/prefetch/t/relationship/doesnt_exist.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/relationship/doesnt_exist.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/relationship/doesnt_exist.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -1,7 +1,5 @@
-#!/usr/bin/perl -w
-
use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
Modified: DBIx-Class/0.08/branches/prefetch/t/relationship/update_or_create_single.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/relationship/update_or_create_single.t 2009-09-14 16:24:44 UTC (rev 7659)
+++ DBIx-Class/0.08/branches/prefetch/t/relationship/update_or_create_single.t 2009-09-14 21:19:00 UTC (rev 7660)
@@ -78,7 +78,7 @@
# expect a year update on the only related row
-# (non-qunique column only)
+# (non-unique column only)
$genre->update_or_create_related ('model_cd', {
year => 2011,
});
@@ -95,5 +95,3 @@
},
'CD year column updated correctly without a disambiguator',
);
-
-
More information about the Bast-commits
mailing list