[Bast-commits] r6039 - in DBIx-Class/0.08/branches/multi_stuff: .
lib/DBIx lib/DBIx/Class lib/DBIx/Class/CDBICompat
lib/DBIx/Class/Manual lib/DBIx/Class/Relationship
lib/DBIx/Class/ResultClass lib/DBIx/Class/Storage
lib/SQL/Translator/Parser/DBIx t t/cdbi t/cdbi/testlib
t/cdbi/testlib/DBIC t/cdbi/testlib/DBIC/Test t/lib
t/lib/DBICTest t/lib/DBICTest/Schema
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Thu Apr 30 08:56:15 GMT 2009
Author: ribasushi
Date: 2009-04-30 09:56:15 +0100 (Thu, 30 Apr 2009)
New Revision: 6039
Added:
DBIx-Class/0.08/branches/multi_stuff/t/63register_source.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/DBIC/
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/DBIC/Test/
Removed:
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Test/
DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Demographic.pm
Modified:
DBIx-Class/0.08/branches/multi_stuff/
DBIx-Class/0.08/branches/multi_stuff/Changes
DBIx-Class/0.08/branches/multi_stuff/Makefile.PL
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/AbstractSearch.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnGroups.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Copy.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Iterator.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationship.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationships.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Cookbook.pod
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Glossary.pod
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Troubleshooting.pod
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Relationship/BelongsTo.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultClass/HashRefInflator.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSetColumn.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSourceHandle.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Row.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Schema.pm
DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/DBI.pm
DBIx-Class/0.08/branches/multi_stuff/lib/SQL/Translator/Parser/DBIx/Class.pm
DBIx-Class/0.08/branches/multi_stuff/t/100extra_source.t
DBIx-Class/0.08/branches/multi_stuff/t/39load_namespaces_rt41083.t
DBIx-Class/0.08/branches/multi_stuff/t/63register_class.t
DBIx-Class/0.08/branches/multi_stuff/t/64db.t
DBIx-Class/0.08/branches/multi_stuff/t/66relationship.t
DBIx-Class/0.08/branches/multi_stuff/t/72pg.t
DBIx-Class/0.08/branches/multi_stuff/t/76select.t
DBIx-Class/0.08/branches/multi_stuff/t/81transactions.t
DBIx-Class/0.08/branches/multi_stuff/t/89dbicadmin.t
DBIx-Class/0.08/branches/multi_stuff/t/90ensure_class_loaded.t
DBIx-Class/0.08/branches/multi_stuff/t/93single_accessor_object.t
DBIx-Class/0.08/branches/multi_stuff/t/96multi_create_torture.t
DBIx-Class/0.08/branches/multi_stuff/t/99dbic_sqlt_parser.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/01-columns.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/columns_dont_override_custom_accessors.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/copy.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/multi_column_set.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_to_undef.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_vs_DateTime.t
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Actor.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/ActorAlias.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Blurb.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/CDBase.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/DBIC/Test/SQLite.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Director.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Film.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Lazy.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Order.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/OtherThing.pm
DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Thing.pm
DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema.pm
DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/CD.pm
DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Genre.pm
DBIx-Class/0.08/branches/multi_stuff/t/lib/sqlite.sql
Log:
r5936 at Thesaurus (orig r5935): ribasushi | 2009-04-21 16:17:04 +0200
Fix dumb omission in t/89dbicadmin.t
Adjust svn:ignore
r5937 at Thesaurus (orig r5936): peter | 2009-04-21 17:52:58 +0200
added IRC nick to contributor list
r5944 at Thesaurus (orig r5943): arcanez | 2009-04-22 05:21:28 +0200
un-todo these tests, load_optional_class is fixed
r5945 at Thesaurus (orig r5944): ribasushi | 2009-04-22 10:14:13 +0200
RT45195 various indexer fixes
r5946 at Thesaurus (orig r5945): ribasushi | 2009-04-22 10:18:14 +0200
Another indexer trick
r5949 at Thesaurus (orig r5948): ribasushi | 2009-04-23 00:25:32 +0200
This code belongs in t/
r5951 at Thesaurus (orig r5950): ribasushi | 2009-04-23 00:28:26 +0200
r5846 at Thesaurus (orig r5845): ribasushi | 2009-03-29 16:55:03 +0200
Fix test - inane assumption on my part
r5952 at Thesaurus (orig r5951): ribasushi | 2009-04-23 00:33:42 +0200
r5863 at Thesaurus (orig r5862): jmmills | 2009-04-08 21:26:57 +0200
patch for no-op, further testing required.
r5953 at Thesaurus (orig r5952): ribasushi | 2009-04-23 00:34:11 +0200
r5927 at Thesaurus (orig r5926): ribasushi | 2009-04-21 11:57:03 +0200
Fix number of tests
r5954 at Thesaurus (orig r5953): ribasushi | 2009-04-23 00:35:52 +0200
r5928 at Thesaurus (orig r5927): ribasushi | 2009-04-21 12:42:14 +0200
Clarify _register_source code, no functional changes
r5955 at Thesaurus (orig r5954): ribasushi | 2009-04-23 00:35:59 +0200
r5929 at Thesaurus (orig r5928): ribasushi | 2009-04-21 12:53:25 +0200
Back out my bogus test from r4902 - this warning was never supposed to be here in the first place - we are essentially dynamically subclassing Artist (although in a very sloppy way)
r5956 at Thesaurus (orig r5955): ribasushi | 2009-04-23 00:37:43 +0200
r5957 at Thesaurus (orig r5956): ribasushi | 2009-04-23 00:37:49 +0200
r5931 at Thesaurus (orig r5930): ribasushi | 2009-04-21 13:06:25 +0200
Sloppy merge - adding imlari's fix from r5902
r5959 at Thesaurus (orig r5958): ribasushi | 2009-04-23 00:48:08 +0200
Fix botched merge again - sorry r5959-5956 are actually a single commit
r5967 at Thesaurus (orig r5966): gphat | 2009-04-23 22:49:04 +0200
Fix busted get_column when using +select (and friends)
r5968 at Thesaurus (orig r5967): arcanez | 2009-04-23 22:58:59 +0200
update Changes for moving load_optional_class
r5976 at Thesaurus (orig r5975): ribasushi | 2009-04-24 01:47:04 +0200
Whops
r5978 at Thesaurus (orig r5977): mo | 2009-04-24 16:24:26 +0200
patch for DBI.pm so store_column is called only once on create() and tests for that
r5979 at Thesaurus (orig r5978): mo | 2009-04-24 16:27:20 +0200
cleanup 72pg.t
r5980 at Thesaurus (orig r5979): ribasushi | 2009-04-24 17:22:05 +0200
Cosmetic change
r5987 at Thesaurus (orig r5986): castaway | 2009-04-25 11:59:28 +0200
Docs on using multiple db schemas (from abraxxa maybe, I forget)
Docs on setting result_class from agaran
r5988 at Thesaurus (orig r5987): ribasushi | 2009-04-27 10:03:58 +0200
Refactor the (almost obsolete) DBD::SQLite check not to fork() within win32
r5989 at Thesaurus (orig r5988): ribasushi | 2009-04-27 10:05:43 +0200
Whops, we don't exit under win32
r5990 at Thesaurus (orig r5989): ribasushi | 2009-04-27 10:14:38 +0200
More AUTHOR dependencies pulled from Replicated.pm
Up MI version to 0.79 (not going further as auto_install is broken again, need a permanent solution)
Reorder configure_requires() as per Alias
Remove Meta_TupleKeys munging as per Alias
r5991 at Thesaurus (orig r5990): ribasushi | 2009-04-27 11:11:15 +0200
Release 0.08101
r5995 at Thesaurus (orig r5994): arcanez | 2009-04-28 09:05:53 +0200
change from DB::Schema to My::Schema
add ::Result:: as necessary (load_namespaces instead of load_classes)
r5996 at Thesaurus (orig r5995): ribasushi | 2009-04-28 11:12:33 +0200
Fix a todo and some minor test adjustments
r5997 at Thesaurus (orig r5996): ribasushi | 2009-04-28 11:35:31 +0200
Bogus test dependency
r6003 at Thesaurus (orig r6002): arcanez | 2009-04-28 22:20:42 +0200
fix for columns => [ ... ] issue
r6014 at Thesaurus (orig r6013): arcanez | 2009-04-29 01:16:48 +0200
test for prefetch by columns
r6016 at Thesaurus (orig r6015): ribasushi | 2009-04-29 10:22:16 +0200
test and patch for failing mini-prefetch via columns (arcanez++)
r6017 at Thesaurus (orig r6016): ribasushi | 2009-04-29 10:23:25 +0200
Add two TODOs by arcanez (not sure about those)
r6018 at Thesaurus (orig r6017): ribasushi | 2009-04-29 10:24:20 +0200
Add TODOs illustrating a problem with as_query
r6019 at Thesaurus (orig r6018): arcanez | 2009-04-29 14:47:03 +0200
untodo/fix test
r6020 at Thesaurus (orig r6019): ribasushi | 2009-04-29 15:39:27 +0200
Strip out inane todo
r6021 at Thesaurus (orig r6020): ribasushi | 2009-04-29 15:40:03 +0200
Forgotten debugging
r6022 at Thesaurus (orig r6021): ribasushi | 2009-04-29 15:41:37 +0200
Fixes to massive breakage introduced by 5948 ribasushi--
r6023 at Thesaurus (orig r6022): ribasushi | 2009-04-29 15:47:23 +0200
Changes
r6024 at Thesaurus (orig r6023): jasonmay | 2009-04-29 17:18:11 +0200
allow multiple classless sources to be registered without dying
r6025 at Thesaurus (orig r6024): jasonmay | 2009-04-29 18:47:26 +0200
add jasonmay to list of contributors
r6034 at Thesaurus (orig r6033): ribasushi | 2009-04-30 08:53:51 +0200
Add tests for r6002
r6036 at Thesaurus (orig r6035): ribasushi | 2009-04-30 10:12:23 +0200
Revert addition of superficial relationship in r5886
r6039 at Thesaurus (orig r6038): ribasushi | 2009-04-30 10:28:04 +0200
Release 0.08102
Property changes on: DBIx-Class/0.08/branches/multi_stuff
___________________________________________________________________
Name: svn:ignore
- _build
blib
pm_to_blib
Build
Build.bat
Makefile
Makefile.old
inc
README
META.yml
MANIFEST
+ _build
blib
pm_to_blib
Build
Build.bat
Makefile
Makefile.old
inc
README
META.yml
MANIFEST
MANIFEST.bak
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:5969
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:11142
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/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/file_column:3920
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/prefetch:5699
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/subclassed_rsset:5840
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/subquery:5617
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/sybase:5651
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/trunk:5925
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:5969
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:11142
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/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/file_column:3920
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/prefetch:5699
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/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/sybase:5651
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/trunk:6038
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/multi_stuff/Changes
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/Changes 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/Changes 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,6 +1,22 @@
Revision history for DBIx::Class
-0.081000 2009-04-19 11:39:35 (UTC)
+0.08102 2009-04-30 08:29:00 (UTC)
+ - Fixed two subtle bugs when using columns or select/as
+ paired with a join (limited prefetch)
+ - Fixed breakage of cdbi tests (RT#45551)
+ - Some POD improvements
+
+0.08101 2009-04-27 09:45:00 (UTC)
+ - Fix +select, +as, +columns and include_columns being stripped
+ by $rs->get_column
+ - move load_optional_class from DBIx::Class::Componentised to
+ Class::C3::Componentised, bump dependency
+ - register_extra_source() now *really* fixed wrt subclassing
+ - Added missing POD descriptions (RT#45195)
+ - Fix insert() to not store_column() every present object column
+ - Multiple Makefile.PL fixes
+
+0.08100 2009-04-19 11:39:35 (UTC)
- Todo out the register_extra_source test until after shipping
0.08099_08 2009-03-30 00:00:00 (UTC)
@@ -10,7 +26,7 @@
directly into the columns definition
- Switched MI code to MRO::Compat
- Document db-side default_value caveats
- - Search_like() now warns to indicate deprecation in 0.09. (robkinyon)
+ - Search_like() now warns to indicate deprecation in 0.09.
- TxnScopeGuard left experimental state
0.08099_07 2009-02-27 02:00:00 (UTC)
@@ -54,11 +70,11 @@
- regression test for source_name
0.08099_05 2008-10-30 21:30:00 (UTC)
- - Rewritte of Storage::DBI::connect_info(), extended with an
+ - Rewrite of Storage::DBI::connect_info(), extended with an
additional argument format type
- InflateColumn::DateTime: add warning about floating timezone
- InflateColumn::DateTime: possible to enforce/skip inflation
- - delete throws exception if passed arguments to prevent drunken mishaps. (purge)
+ - delete throws exception if passed arguments to prevent drunken mishaps.
- Fix storage to copy scalar conds before regexping to avoid
trying to modify a constant in odd edge cases
- Related resultsets on uninserted objects are now empty
Modified: DBIx-Class/0.08/branches/multi_stuff/Makefile.PL
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/Makefile.PL 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/Makefile.PL 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,4 +1,4 @@
-use inc::Module::Install 0.67;
+use inc::Module::Install 0.79;
use strict;
use warnings;
use POSIX ();
@@ -9,6 +9,10 @@
perl_version '5.006001';
all_from 'lib/DBIx/Class.pm';
+# configure_requires so _check_sqlite() below can run
+# remove once test deprecated
+configure_requires 'DBD::SQLite';
+
requires 'DBD::SQLite' => 1.23;
requires 'Data::Page' => 2.00;
requires 'Scalar::Util' => 0;
@@ -31,9 +35,6 @@
# Perl 5.8.0 doesn't have utf8::is_utf8()
requires 'Encode' => 0 if ($] <= 5.008000);
-# configure_requires so the sanity check below can run
-configure_requires 'DBD::SQLite';
-
test_requires 'Test::Builder' => 0.33;
test_requires 'Test::Warn' => 0.11;
test_requires 'Test::Exception' => 0;
@@ -41,9 +42,13 @@
recommends 'SQL::Translator' => 0.09004;
-install_script 'script/dbicadmin';
+install_script (qw|
+ script/dbicadmin
+|);
-tests_recursive 't';
+tests_recursive (qw|
+ t
+|);
# re-build README and require extra modules for testing if we're in a checkout
@@ -55,8 +60,9 @@
'DBIx::ContextualFetch' => 0,
'Class::DBI::Plugin::DeepAbstractSearch' => 0,
'Class::Trigger' => 0,
- 'Time::Piece' => 0,
+ 'Time::Piece::MySQL' => 0,
'Clone' => 0,
+ 'Date::Simple' => 0,
# t/52cycle.t
'Test::Memory::Cycle' => 0,
@@ -71,8 +77,10 @@
,
# t/93storage_replication.t
- 'Moose', => 0,
- 'MooseX::AttributeHelpers' => 0.12,
+ 'Moose', => 0.54,
+ 'Moose::Util::TypeConstraints' => 0.54,
+ 'MooseX::AttributeHelpers' => 0.12,
+ 'Class::MOP' => 0.63,
# t/96_is_deteministic_value.t
'DateTime::Format::Strptime' => 0,
@@ -104,59 +112,50 @@
auto_install;
# Have all prerequisites, check DBD::SQLite sanity
-if (! $ENV{DBICTEST_NO_SQLITE_CHECK} ) {
+_check_sqlite() if (! $ENV{DBICTEST_NO_SQLITE_CHECK} );
- my $pid = fork();
- if (not defined $pid) {
- die "Unable to fork(): $!";
- }
- elsif (! $pid) {
+WriteAll();
- # Win32 does not have real fork()s so a segfault will bring
- # everything down. Warn about it.
- if ($^O eq 'MSWin32') {
- print <<'EOW';
+if ($Module::Install::AUTHOR) {
+ # Need to do this _after_ WriteAll else it loses track of them
+ Meta->{values}{build_requires} = [ grep {
+ my $ok = 1;
+ foreach my $module (keys %force_requires_if_author) {
+ if ($_->[0] =~ /$module/) {
+ $ok = 0;
+ last;
+ }
+ }
+ $ok;
+ } @{Meta->{values}{build_requires}} ];
-######################################################################
-# #
-# A short stress-testing of DBD::SQLite will follow. If you have a #
-# buggy library this might very well be the last text you will see #
-# before the installation silently terminates. If this happens it #
-# would mean that you are running a buggy version of DBD::SQLite #
-# known to randomly segfault on errors. Even if you have the latest #
-# CPAN module version, the system sqlite3 dynamic library might have #
-# been compiled against an older buggy sqlite3 dev library (oddly #
-# DBD::SQLite will prefer the system library against the one bundled #
-# with it). You are strongly advised to resolve this issue before #
-# proceeding. #
-# #
-# If this happens to you (this text is the last thing you see), and #
-# you just want to install this module without worrying about the #
-# tests (which will almost certainly fail) - set the environment #
-# variable DBICTEST_NO_SQLITE_CHECK to a true value and try again. #
-# #
-######################################################################
+ Meta->{values}{resources} = [
+ [ 'MailingList', 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class' ],
+ [ 'IRC', 'irc://irc.perl.org/#dbix-class' ],
+ [ 'license', 'http://dev.perl.org/licenses/' ],
+ [ 'repository', 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/' ],
+ ];
+ Meta->write;
+}
-EOW
- }
- require DBI;
- for (1 .. 100) {
- my $dbh;
- $dbh = DBI->connect ('dbi:SQLite::memory:', undef, undef, {
- AutoCommit => 1,
- RaiseError => 0,
- PrintError => 0,
- })
- or die "Unable to connect to database: $@";
- $dbh->do ('CREATE TABLE name_with_no_columns'); # a subtle syntax error
- $dbh->do ('COMMIT'); # followed by commit
- $dbh->disconnect;
- }
+# This is legacy code. Latest DBD::SQLite developments fixed all known bugs
+# in this area. Remove before some arbitrary next version
+sub _check_sqlite {
+ # Win32 does not have real fork()s so a segfault will bring
+ # everything down. Warn about it below, and don't try fork()
+ if ($^O ne 'MSWin32') {
+
+ my $pid = fork();
+ if (not defined $pid) {
+ die "Unable to fork(): $!";
+ }
+ elsif (! $pid) {
+ _torture_sqlite();
exit 0;
- }
- else {
+ }
+ else {
eval {
local $SIG{ALRM} = sub { die "timeout\n" };
alarm 5;
@@ -167,7 +166,7 @@
my $sig = $? & 127;
-# make sure process actually dies
+ # make sure process actually dies
$exception && kill POSIX::SIGKILL(), $pid;
if ($exception || $sig == POSIX::SIGSEGV() || $sig == POSIX::SIGABRT()
@@ -193,40 +192,50 @@
);
exit 0 unless ($ans =~ /^y(es)?$/i);
}
+ }
}
-}
+ else { # the win32 version
-WriteAll();
+ print <<'EOW';
+######################################################################
+# #
+# A short stress-testing of DBD::SQLite will follow. If you have a #
+# buggy library this might very well be the last text you will see #
+# before the installation silently terminates. If this happens it #
+# would mean that you are running a buggy version of DBD::SQLite #
+# known to randomly segfault on errors. Even if you have the latest #
+# CPAN module version, the system sqlite3 dynamic library might have #
+# been compiled against an older buggy sqlite3 dev library (oddly #
+# DBD::SQLite will prefer the system library against the one bundled #
+# with it). You are strongly advised to resolve this issue before #
+# proceeding. #
+# #
+# If this happens to you (this text is the last thing you see), and #
+# you just want to install this module without worrying about the #
+# tests (which will almost certainly fail) - set the environment #
+# variable DBICTEST_NO_SQLITE_CHECK to a true value and try again. #
+# #
+######################################################################
+EOW
-if ($Module::Install::AUTHOR) {
- # Need to do this _after_ WriteAll else it loses track of them
- Meta->{values}{build_requires} = [ grep {
- my $ok = 1;
- foreach my $module (keys %force_requires_if_author) {
- if ($_->[0] =~ /$module/) {
- $ok = 0;
- last;
- }
- }
- $ok;
- } @{Meta->{values}{build_requires}} ];
+ _torture_sqlite();
+ }
+}
- my @scalar_keys = Module::Install::Metadata::Meta_TupleKeys();
- my $cr = Module::Install::Metadata->can("Meta_TupleKeys");
- {
- no warnings 'redefine';
- *Module::Install::Metadata::Meta_TupleKeys = sub {
- return $cr->(@_), 'resources';
- };
+sub _torture_sqlite {
+ require DBI;
+
+ for (1 .. 100) {
+ my $dbh = DBI->connect ('dbi:SQLite::memory:', undef, undef, {
+ AutoCommit => 1,
+ RaiseError => 0,
+ PrintError => 0,
+ }) or die "Unable to connect to database: $@";
+
+ $dbh->do ('CREATE TABLE name_with_no_columns'); # a subtle syntax error
+ $dbh->do ('COMMIT'); # followed by commit
+ $dbh->disconnect;
}
- Meta->{values}{resources} = [
- [ 'MailingList', 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class' ],
- [ 'IRC', 'irc://irc.perl.org/#dbix-class' ],
- [ 'license', 'http://dev.perl.org/licenses/' ],
- [ 'repository', 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/' ],
- ];
- Meta->write;
}
-
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/AbstractSearch.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/AbstractSearch.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/AbstractSearch.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -6,7 +6,7 @@
=head1 NAME
-DBIx::Class::CDBICompat::AbstractSearch
+DBIx::Class::CDBICompat::AbstractSearch - Emulates Class::DBI::AbstractSearch
=head1 SYNOPSIS
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnGroups.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnGroups.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnGroups.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -155,7 +155,8 @@
return map { $class->find_column($_) } @col;
}
-package DBIx::Class::CDBICompat::ColumnGroups::GrouperShim;
+package # hide from PAUSE (should be harmless, no POD no Version)
+ DBIx::Class::CDBICompat::ColumnGroups::GrouperShim;
sub groups_for {
my ($self, @cols) = @_;
@@ -167,6 +168,5 @@
}
return keys %groups;
}
-
1;
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -7,7 +7,7 @@
=head1 NAME
-DBIx::Class::CDBICompat::ColumnsAsHash
+DBIx::Class::CDBICompat::ColumnsAsHash - Emulates the behavior of Class::DBI where the object can be accessed as a hash of columns.
=head1 SYNOPSIS
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Copy.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Copy.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Copy.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -8,7 +8,7 @@
=head1 NAME
-DBIx::Class::CDBICompat::Copy
+DBIx::Class::CDBICompat::Copy - Emulates Class::DBI->copy($new_id)
=head1 SYNOPSIS
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Iterator.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Iterator.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Iterator.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -6,7 +6,7 @@
=head1 NAME
-DBIx::Class::CDBICompat::Iterator
+DBIx::Class::CDBICompat::Iterator - Emulates the extra behaviors of the Class::DBI search iterator.
=head1 SYNOPSIS
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -6,7 +6,7 @@
=head1 NAME
-DBIx::Class::CDBICompat::NoObjectIndex
+DBIx::Class::CDBICompat::NoObjectIndex - Defines empty methods for object indexing. They do nothing
=head1 SYNOPSIS
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationship.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationship.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationship.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -7,7 +7,7 @@
=head1 NAME
-DBIx::Class::CDBICompat::Relationship
+DBIx::Class::CDBICompat::Relationship - Emulate the Class::DBI::Relationship object returned from meta_info()
=head1 DESCRIPTION
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationships.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationships.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/CDBICompat/Relationships.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -14,7 +14,7 @@
=head1 NAME
-DBIx::Class::CDBICompat::Relationships
+DBIx::Class::CDBICompat::Relationships - Emulate has_a(), has_many(), might_have() and meta_info()
=head1 DESCRIPTION
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Cookbook.pod
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Cookbook.pod 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Cookbook.pod 2009-04-30 08:56:15 UTC (rev 6039)
@@ -105,7 +105,7 @@
Say you want to run a complex custom query on your user data, here's what
you have to add to your User class:
- package My::Schema::User;
+ package My::Schema::Result::User;
use base qw/DBIx::Class/;
@@ -149,10 +149,10 @@
achieve the same with subclassing the resultset class and defining the
ResultSource there:
- package My::Schema::UserFriendsComplex;
+ package My::Schema::Result::UserFriendsComplex;
- use My::Schema::User;
- use base qw/My::Schema::User/;
+ use My::Schema::Result::User;
+ use base qw/My::Schema::Result::User/;
__PACKAGE__->table('dummy'); # currently must be called before anything else
@@ -673,7 +673,7 @@
module.
To make an object stringify itself as a single column, use something
-like this (replace C<foo> with the column/method of your choice):
+like this (replace C<name> with the column/method of your choice):
use overload '""' => sub { shift->name}, fallback => 1;
@@ -740,16 +740,16 @@
B<Schema Definition>
- package DB::Schema;
+ package My::Schema;
use base qw/DBIx::Class::Schema/;
- __PACKAGE__->load_classes(qw/User/);
+ __PACKAGE__->load_namespaces;
B<Proxy-Class definitions>
- package DB::Schema::User;
+ package My::Schema::Result::User;
use strict;
use warnings;
@@ -784,11 +784,11 @@
}
- package DB::Schema::User::Admin;
+ package My::Schema::Result::User::Admin;
use strict;
use warnings;
- use base qw/DB::Schema::User/;
+ use base qw/My::Schema::Result::User/;
sub hello
{
@@ -806,7 +806,7 @@
use warnings;
use strict;
- use DB::Schema;
+ use My::Schema;
my $user_data = { email => 'someguy at place.com',
password => 'pass1',
@@ -816,7 +816,7 @@
password => 'pass2',
admin => 1 };
- my $schema = DB::Schema->connection('dbi:Pg:dbname=test');
+ my $schema = My::Schema->connection('dbi:Pg:dbname=test');
$schema->resultset('User')->create( $user_data );
$schema->resultset('User')->create( $admin_data );
@@ -854,11 +854,16 @@
Wasn't that easy?
+Beware, changing the Result class using
+L<DBIx::Class::ResultSet/result_class> will replace any existing class
+completely including any special components loaded using
+load_components, eg L<DBIx::Class::InflateColumn::DateTime>.
+
=head2 Get raw data for blindingly fast results
If the L<HashRefInflator|DBIx::Class::ResultClass::HashRefInflator> solution
above is not fast enough for you, you can use a DBIx::Class to return values
-exactly as they come out of the data base with none of the convenience methods
+exactly as they come out of the database with none of the convenience methods
wrapped round them.
This is used like so:
@@ -869,13 +874,13 @@
}
You will need to map the array offsets to particular columns (you can
-use the I<select> attribute of C<search()> to force ordering).
+use the L<DBIx::Class::ResultSet/select> attribute of L<DBIx::Class::ResultSet/search> to force ordering).
=head1 RESULTSET OPERATIONS
=head2 Getting Schema from a ResultSet
-To get the schema object from a result set, do the following:
+To get the L<DBIx::Class::Schema> object from a ResultSet, do the following:
$rs->result_source->schema
@@ -1015,6 +1020,98 @@
$rs = $user->addresses(); # get all addresses for a user
$rs = $address->users(); # get all users for an address
+=head2 Relationships across DB schemas
+
+Mapping relationships across L<DB schemas|DBIx::Class::Manual::Glossary/DB schema>
+is easy as long as the schemas themselves are all accessible via the same DBI
+connection. In most cases, this means that they are on the same database host
+as each other and your connecting database user has the proper permissions to them.
+
+To accomplish this one only needs to specify the DB schema name in the table
+declaration, like so...
+
+ package MyDatabase::Main::Artist;
+ use base qw/DBIx::Class/;
+ __PACKAGE__->load_components(qw/PK::Auto Core/);
+
+ __PACKAGE__->table('database1.artist'); # will use "database1.artist" in FROM clause
+
+ __PACKAGE__->add_columns(qw/ artistid name /);
+ __PACKAGE__->set_primary_key('artistid');
+ __PACKAGE__->has_many('cds' => 'MyDatabase::Main::Cd');
+
+ 1;
+
+Whatever string you specify there will be used to build the "FROM" clause in SQL
+queries.
+
+The big drawback to this is you now have DB schema names hardcoded in your
+class files. This becomes especially troublesome if you have multiple instances
+of your application to support a change lifecycle (e.g. DEV, TEST, PROD) and
+the DB schemas are named based on the environment (e.g. database1_dev).
+
+However, one can dynamically "map" to the proper DB schema by overriding the
+L<connection|DBIx::Class::Schama/connection> method in your Schema class and
+building a renaming facility, like so:
+
+ package MyDatabase::Schema;
+ use Moose;
+
+ extends 'DBIx::Class::Schema';
+
+ around connection => sub {
+ my ( $inner, $self, $dsn, $username, $pass, $attr ) = ( shift, @_ );
+
+ my $postfix = delete $attr->{schema_name_postfix};
+
+ $inner->(@_);
+
+ if ( $postfix ) {
+ $self->append_db_name($postfix);
+ }
+ };
+
+ sub append_db_name {
+ my ( $self, $postfix ) = @_;
+
+ my @sources_with_db
+ = grep
+ { $_->name =~ /^\w+\./mx }
+ map
+ { $self->source($_) }
+ $self->sources;
+
+ foreach my $source (@sources_with_db) {
+ my $name = $source->name;
+ $name =~ s{^(\w+)\.}{${1}${postfix}\.}mx;
+
+ $source->name($name);
+ }
+ }
+
+ 1;
+
+By overridding the L<connection|DBIx::Class::Schama/connection>
+method and extracting a custom option from the provided \%attr hashref one can
+then simply iterate over all the Schema's ResultSources, renaming them as
+needed.
+
+To use this facility, simply add or modify the \%attr hashref that is passed to
+L<connection|DBIx::Class::Schama/connect>, as follows:
+
+ my $schema
+ = MyDatabase::Schema->connect(
+ $dsn,
+ $user,
+ $pass,
+ {
+ schema_name_postfix => '_dev'
+ # ... Other options as desired ...
+ })
+
+Obviously, one could accomplish even more advanced mapping via a hash map or a
+callback routine.
+
=head1 TRANSACTIONS
As of version 0.04001, there is improved transaction support in
@@ -1224,7 +1321,7 @@
L<callback system|DBIx::Class::ResultSource/sqlt_deploy_callback> if you wish
to share a hook between multiple sources):
- package My::Schema::Artist;
+ package My::Schema::Result::Artist;
__PACKAGE__->table('artist');
__PACKAGE__->add_columns(id => { ... }, name => { ... })
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Glossary.pod
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Glossary.pod 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Glossary.pod 2009-04-30 08:56:15 UTC (rev 6039)
@@ -9,6 +9,17 @@
=head1 TERMS
+=head2 DB schema
+
+Refers to a single physical schema within an RDBMS. Synonymous with the terms
+'database', for MySQL; and 'schema', for most other RDBMS(s).
+
+In other words, it's the 'xyz' _thing_ you're connecting to when using any of
+the following L<DSN|DBI/connect>(s):
+
+ dbi:DriverName:xyz at hostname:port
+ dbi:DriverName:database=xyz;host=hostname;port=port
+
=head2 Inflation
The act of turning database row data into objects in
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Troubleshooting.pod
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Troubleshooting.pod 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Manual/Troubleshooting.pod 2009-04-30 08:56:15 UTC (rev 6039)
@@ -47,7 +47,7 @@
L<DBI> version 1.50 and L<DBD::Pg> 1.43 are known to work.
-=head2 ... Can't locate object method "source_name" via package ...
+=head2 Can't locate object method "source_name" via package
There's likely a syntax error in the table class referred to elsewhere
in this error message. In particular make sure that the package
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Relationship/BelongsTo.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Relationship/BelongsTo.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Relationship/BelongsTo.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -79,12 +79,14 @@
return 1;
}
-=head1 AUTHORS
+# Attempt to remove the POD so it (maybe) falls off the indexer
-Alexander Hartmaier <Alexander.Hartmaier at t-systems.at>
+#=head1 AUTHORS
+#
+#Alexander Hartmaier <Alexander.Hartmaier at t-systems.at>
+#
+#Matt S. Trout <mst at shadowcatsystems.co.uk>
+#
+#=cut
-Matt S. Trout <mst at shadowcatsystems.co.uk>
-
-=cut
-
1;
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultClass/HashRefInflator.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultClass/HashRefInflator.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultClass/HashRefInflator.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -5,7 +5,7 @@
=head1 NAME
-DBIx::Class::ResultClass::HashRefInflator
+DBIx::Class::ResultClass::HashRefInflator - Get raw hashrefs from a resultset
=head1 SYNOPSIS
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSet.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSet.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1121,6 +1121,11 @@
C<< result_source->result_class >> - which in most cases is the name of the
L<"table"|DBIx::Class::Manual::Glossary/"ResultSource"> class.
+Note that changing the result_class will also remove any components
+that were originally loaded in the source class via
+L<DBIx::Class::ResultSource/load_components>. Any overloaded methods
+in the original source class will not run.
+
=cut
sub result_class {
@@ -2399,12 +2404,20 @@
# build columns (as long as select isn't set) into a set of as/select hashes
unless ( $attrs->{select} ) {
@colbits = map {
- ( ref($_) eq 'HASH' ) ? $_
- : {
- (
- /^\Q${alias}.\E(.+)$/ ? $1
- : $_
- ) => ( /\./ ? $_ : "${alias}.$_" )
+ ( ref($_) eq 'HASH' )
+ ? $_
+ : {
+ (
+ /^\Q${alias}.\E(.+)$/
+ ? "$1"
+ : "$_"
+ )
+ =>
+ (
+ /\./
+ ? "$_"
+ : "${alias}.$_"
+ )
}
} ( ref($attrs->{columns}) eq 'ARRAY' ) ? @{ delete $attrs->{columns}} : (delete $attrs->{columns} || $source->columns );
}
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSetColumn.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSetColumn.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSetColumn.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -38,7 +38,7 @@
$class = ref $class if ref $class;
my $new_parent_rs = $rs->search_rs; # we don't want to mess up the original, so clone it
my $attrs = $new_parent_rs->_resolved_attrs;
- $new_parent_rs->{attrs}->{$_} = undef for qw(prefetch include_columns +select +as); # prefetch, include_columns, +select, +as cause additional columns to be fetched
+ $new_parent_rs->{attrs}->{prefetch} = undef; # prefetch cause additional columns to be fetched
# If $column can be found in the 'as' list of the parent resultset, use the
# corresponding element of its 'select' list (to keep any custom column
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSourceHandle.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSourceHandle.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/ResultSourceHandle.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -20,7 +20,7 @@
=head1 NAME
-DBIx::Class::ResultSourceHandle
+DBIx::Class::ResultSourceHandle - Decouple Rows/ResultSets objects from their Source objects
=head1 DESCRIPTION
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Row.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Row.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -981,6 +981,9 @@
Reblessing can also be done more easily by setting C<result_class> in
your Result class. See L<DBIx::Class::ResultSource/result_class>.
+Different types of results can also be created from a particular
+L<DBIx::Class::ResultSet>, see L<DBIx::Class::ResultSet/result_class>.
+
=cut
sub inflate_result {
@@ -1026,7 +1029,6 @@
$fetched = $pre_source->result_class->inflate_result(
$pre_source, @{$pre_val});
}
- $new->related_resultset($pre)->set_cache([ $fetched ]);
my $accessor = $source->relationship_info($pre)->{attrs}{accessor};
$class->throw_exception("No accessor for prefetched $pre")
unless defined $accessor;
@@ -1037,6 +1039,7 @@
} else {
$class->throw_exception("Prefetch not supported with accessor '$accessor'");
}
+ $new->related_resultset($pre)->set_cache([ $fetched ]);
}
}
return $new;
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Schema.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Schema.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1267,25 +1267,33 @@
sub _register_source {
my ($self, $moniker, $source, $params) = @_;
+ my $orig_source = $source;
+
$source = $source->new({ %$source, source_name => $moniker });
+ $source->schema($self);
+ weaken($source->{schema}) if ref($self);
+ my $rs_class = $source->result_class;
+
my %reg = %{$self->source_registrations};
$reg{$moniker} = $source;
$self->source_registrations(\%reg);
- $source->schema($self);
- weaken($source->{schema}) if ref($self);
return if ($params->{extra});
+ return unless defined($rs_class) && $rs_class->can('result_source_instance');
- if ($source->result_class) {
- my %map = %{$self->class_mappings};
- if (exists $map{$source->result_class}
- && $map{$source->result_class} ne $moniker) {
- warn $source->result_class . ' already has a source, use register_extra_source for additional sources';
- }
- $map{$source->result_class} = $moniker;
- $self->class_mappings(\%map);
+ my %map = %{$self->class_mappings};
+ if (
+ exists $map{$rs_class}
+ and
+ $map{$rs_class} ne $moniker
+ and
+ $rs_class->result_source_instance ne $orig_source
+ ) {
+ carp "$rs_class already has a source, use register_extra_source for additional sources";
}
+ $map{$rs_class} = $moniker;
+ $self->class_mappings(\%map);
}
sub _unregister_source {
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/DBI.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/DBI.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1286,20 +1286,22 @@
my $ident = $source->from;
my $bind_attributes = $self->source_bind_attributes($source);
+ my $updated_cols = {};
+
$self->ensure_connected;
foreach my $col ( $source->columns ) {
if ( !defined $to_insert->{$col} ) {
my $col_info = $source->column_info($col);
if ( $col_info->{auto_nextval} ) {
- $to_insert->{$col} = $self->_sequence_fetch( 'nextval', $col_info->{sequence} || $self->_dbh_get_autoinc_seq($self->dbh, $source) );
+ $updated_cols->{$col} = $to_insert->{$col} = $self->_sequence_fetch( 'nextval', $col_info->{sequence} || $self->_dbh_get_autoinc_seq($self->dbh, $source) );
}
}
}
$self->_execute('insert' => [], $source, $bind_attributes, $to_insert);
- return $to_insert;
+ return $updated_cols;
}
## Still not quite perfect, and EXPERIMENTAL
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -24,7 +24,7 @@
# i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
# brain damage and presumably various other packaging systems too
-$VERSION = '0.08100';
+$VERSION = '0.08102';
$VERSION = eval $VERSION; # numify for warning-free dev releases
@@ -245,6 +245,8 @@
ilmari: Dagfinn Ilmari MannsE<aring>ker <ilmari at ilmari.org>
+jasonmay: Jason May <jason.a.may at gmail.com>
+
jesper: Jesper Krogh
jgoulah: John Goulah <jgoulah at cpan.org>
@@ -285,7 +287,7 @@
perigrin: Chris Prather <chris at prather.org>
-Peter Collingbourne <peter at pcc.me.uk>
+peter: Peter Collingbourne <peter at pcc.me.uk>
phaylon: Robert Sedlacek <phaylon at dunkelheit.at>
Modified: DBIx-Class/0.08/branches/multi_stuff/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -293,14 +293,14 @@
interrogates the columns, and stuffs it all in an $sqlt_schema object.
It's primary use is in deploying database layouts described as a set
-of L<DBIx::Class> classes, to a database. To do this, see the
-L<DBIx::Class::Schema/deploy> method.
+of L<DBIx::Class> classes, to a database. To do this, see
+L<DBIx::Class::Schema/deploy>.
This can also be achieved by having DBIx::Class export the schema as a
set of SQL files ready for import into your database, or passed to
other machines that need to have your application installed but don't
-have SQL::Translator installed. To do this see the
-L<DBIx::Class::Schema/create_ddl_dir> method.
+have SQL::Translator installed. To do this see
+L<DBIx::Class::Schema/create_ddl_dir>.
=head1 SEE ALSO
Modified: DBIx-Class/0.08/branches/multi_stuff/t/100extra_source.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/100extra_source.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/100extra_source.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -38,7 +38,7 @@
{
my $source = $schema->source('DBICTest::Artist');
$schema->register_source($source->source_name, $source);
- is($warn, '', "regregistering an existing source under the same name causes no errors");
+ is($warn, '', "re-registering an existing source under the same name causes no errors");
}
{
Modified: DBIx-Class/0.08/branches/multi_stuff/t/39load_namespaces_rt41083.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/39load_namespaces_rt41083.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/39load_namespaces_rt41083.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -2,31 +2,10 @@
use strict;
use warnings;
-use Test::More skip_all => 'Postponed until after 0.08100';
use lib 't/lib';
+use Test::More tests => 8;
-=begin
-
-How did this get back here? The test is borked, there is a branch with
-the correct test and a tentative fix - branches/subclassed_rsset
-
-Make sure to nuke this file when merging, it is only left here to make
-merging of the above branch easier.
-
-
-ribasushi
-
-
-=cut
-
-
-__END__
-
-
-
-plan tests => 15;
-
sub _chk_warning {
defined $_[0]?
$_[0] !~ qr/We found ResultSet class '([^']+)' for '([^']+)', but it seems that you had already set '([^']+)' to use '([^']+)' instead/ :
@@ -45,16 +24,6 @@
\@monikers,
'List of resultsource registrations',
);
-
- my %seen_rc;
- for my $m (@monikers) {
- my $src = DBICNSTest::RtBug41083->source ($m);
- my $rc = $src->result_class;
-
- ok ( (++$seen_rc{$rc} == 1), "result_class of $m is unique")
- || diag "Source: $m, result_class: $rc";
- like ($rc, qr/:: $m $/x, 'result_class matches moniker');
- }
}
{
Modified: DBIx-Class/0.08/branches/multi_stuff/t/63register_class.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/63register_class.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/63register_class.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,19 +1,14 @@
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
use lib qw(t/lib);
use DBICTest;
use DBICTest::Schema;
use DBICTest::Schema::Artist;
DBICTest::Schema::Artist->source_name('MyArtist');
-{
- my $w;
- local $SIG{__WARN__} = sub { $w = shift };
- DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist');
- like ($w, qr/use register_extra_source/, 'Complain about using register_class on an already-registered class');
-}
+DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist');
my $schema = DBICTest->init_schema();
Added: DBIx-Class/0.08/branches/multi_stuff/t/63register_source.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/63register_source.t (rev 0)
+++ DBIx-Class/0.08/branches/multi_stuff/t/63register_source.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+
+use Test::Exception tests => 1;
+use lib qw(t/lib);
+use DBICTest;
+use DBICTest::Schema;
+use DBIx::Class::ResultSource::Table;
+
+my $schema = DBICTest->init_schema();
+
+my $foo = DBIx::Class::ResultSource::Table->new({ name => "foo" });
+my $bar = DBIx::Class::ResultSource::Table->new({ name => "bar" });
+
+lives_ok {
+ $schema->register_source(foo => $foo);
+ $schema->register_source(bar => $bar);
+} 'multiple classless sources can be registered';
Modified: DBIx-Class/0.08/branches/multi_stuff/t/64db.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/64db.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/64db.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -64,7 +64,12 @@
'rank' => {
'data_type' => 'integer',
'is_nullable' => 0,
+ 'default_value' => '13',
},
+ 'charfield' => {
+ 'data_type' => 'char',
+ 'is_nullable' => 1,
+ },
},
'Correctly retrieve column info (mixed null and non-null columns)'
);
Modified: DBIx-Class/0.08/branches/multi_stuff/t/66relationship.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/66relationship.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/66relationship.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -290,12 +290,13 @@
my $relinfo_with_attr = $rs_overridden->relationship_info ('cd_3');
cmp_ok($relinfo_with_attr->{attrs}{is_foreign_key_constraint}, '==', 0, "is_foreign_key_constraint defined for belongs_to relationships with attr.");
-# check that relationships below left join relationships are forced to left joins
-my $cds = $schema->resultset("CD")->search({ cdid => 1 }, { join => { genre => 'demographic' } });
+# check that relationships below left join relationships are forced to left joins
+# when traversing multiple belongs_to
+my $cds = $schema->resultset("CD")->search({ 'me.cdid' => 5 }, { join => { single_track => 'cd' } });
is($cds->count, 1, "subjoins under left joins force_left (string)");
-$cds = $schema->resultset("CD")->search({ cdid => 1 }, { join => { genre => [ 'demographic' ] } });
+$cds = $schema->resultset("CD")->search({ 'me.cdid' => 5 }, { join => { single_track => ['cd'] } });
is($cds->count, 1, "subjoins under left joins force_left (arrayref)");
-$cds = $schema->resultset("CD")->search({ cdid => 1 }, { join => { genre => { demographic => {} } } });
+$cds = $schema->resultset("CD")->search({ 'me.cdid' => 5 }, { join => { single_track => { cd => {} } } });
is($cds->count, 1, "subjoins under left joins force_left (hashref)");
Modified: DBIx-Class/0.08/branches/multi_stuff/t/72pg.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/72pg.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/72pg.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -15,10 +15,15 @@
__PACKAGE__->load_components(qw/Core/);
__PACKAGE__->table('testschema.casecheck');
- __PACKAGE__->add_columns(qw/id name NAME uc_name/);
+ __PACKAGE__->add_columns(qw/id name NAME uc_name storecolumn/);
__PACKAGE__->column_info_from_storage(1);
__PACKAGE__->set_primary_key('id');
+ sub store_column {
+ my ($self, $name, $value) = @_;
+ $value = '#'.$value if($name eq "storecolumn");
+ $self->maybe::next::method($name, $value);
+ }
}
{
@@ -45,7 +50,7 @@
unless ($dsn && $user);
-plan tests => 37;
+plan tests => 39;
DBICTest::Schema->load_classes( 'Casecheck', 'ArrayTest' );
my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
@@ -73,10 +78,17 @@
$dbh->do("CREATE SEQUENCE pkid1_seq START 1 MAXVALUE 999999 MINVALUE 0");
$dbh->do("CREATE SEQUENCE pkid2_seq START 10 MAXVALUE 999999 MINVALUE 0");
$dbh->do("CREATE SEQUENCE nonpkid_seq START 20 MAXVALUE 999999 MINVALUE 0");
- ok ( $dbh->do('CREATE TABLE testschema.casecheck (id serial PRIMARY KEY, "name" VARCHAR(1), "NAME" VARCHAR(2), "UC_NAME" VARCHAR(3));'), 'Creation of casecheck table');
+ ok ( $dbh->do('CREATE TABLE testschema.casecheck (id serial PRIMARY KEY, "name" VARCHAR(1), "NAME" VARCHAR(2), "UC_NAME" VARCHAR(3), "storecolumn" VARCHAR(10));'), 'Creation of casecheck table');
ok ( $dbh->do('CREATE TABLE testschema.array_test (id serial PRIMARY KEY, arrayfield INTEGER[]);'), 'Creation of array_test table');
}
+# store_column is called once for create() for non sequence columns
+
+ok(my $storecolumn = $schema->resultset('Casecheck')->create({'storecolumn' => 'a'}));
+
+is($storecolumn->storecolumn, '#a'); # was '##a'
+
+
# This is in Core now, but it's here just to test that it doesn't break
$schema->class('Artist')->load_components('PK::Auto');
@@ -150,7 +162,7 @@
my $count;
lives_ok {
$count = $schema->resultset('ArrayTest')->search({
- arrayfield => \[ '= ?' => [arrayfield => [3, 4]] ], #TODO anything less ugly than this?
+ arrayfield => \[ '= ?' => [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');
@@ -243,20 +255,16 @@
});
}
-SKIP: {
- skip "Oracle Auto-PK tests are broken", 16;
-
- # test auto increment using sequences WITHOUT triggers
- for (1..5) {
+for (1..5) {
my $st = $schema->resultset('SequenceTest')->create({ name => 'foo' });
is($st->pkid1, $_, "Oracle Auto-PK without trigger: First primary key");
is($st->pkid2, $_ + 9, "Oracle Auto-PK without trigger: Second primary key");
is($st->nonpkid, $_ + 19, "Oracle Auto-PK without trigger: Non-primary key");
- }
- my $st = $schema->resultset('SequenceTest')->create({ name => 'foo', pkid1 => 55 });
- is($st->pkid1, 55, "Oracle Auto-PK without trigger: First primary key set manually");
}
+my $st = $schema->resultset('SequenceTest')->create({ name => 'foo', pkid1 => 55 });
+is($st->pkid1, 55, "Oracle Auto-PK without trigger: First primary key set manually");
+
END {
if($dbh) {
$dbh->do("DROP TABLE testschema.artist;");
@@ -269,4 +277,3 @@
$dbh->do("DROP SCHEMA testschema;");
}
}
-
Modified: DBIx-Class/0.08/branches/multi_stuff/t/76select.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/76select.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/76select.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -5,10 +5,11 @@
use Test::Exception;
use lib qw(t/lib);
use DBICTest;
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
-plan tests => 12;
+plan tests => 24;
my $rs = $schema->resultset('CD')->search({},
{
@@ -28,6 +29,16 @@
lives_ok(sub { $rs->first->get_column('count') }, 'multiple +select/+as columns, 1st rscolumn present');
lives_ok(sub { $rs->first->get_column('addedtitle') }, 'multiple +select/+as columns, 2nd rscolumn present');
+# Tests a regression in ResultSetColumn wrt +select
+$rs = $schema->resultset('CD')->search(undef,
+ {
+ '+select' => [ \'COUNT(*) AS year_count' ],
+ order_by => 'year_count'
+ }
+);
+my @counts = $rs->get_column('cdid')->all;
+ok(scalar(@counts), 'got rows from ->all using +select');
+
$rs = $schema->resultset('CD')->search({},
{
'+select' => [ \ 'COUNT(*)', 'title' ],
@@ -63,3 +74,128 @@
is ($subsel->next->title, $cds->next->title, 'Second CD title match');
is($schema->resultset('CD')->current_source_alias, "me", '$rs->current_source_alias returns "me"');
+
+
+
+$rs = $schema->resultset('CD')->search({},
+ {
+ 'join' => 'artist',
+ 'columns' => ['cdid', 'title', 'artist.name'],
+ }
+);
+
+my ($sql, @bind) = @${$rs->as_query};
+is_same_sql_bind (
+ $sql,
+ \@bind,
+ '(SELECT me.cdid, me.title, artist.name FROM cd me JOIN artist artist ON artist.artistid = me.artist)',
+ [],
+ 'Use of columns attribute results in proper sql'
+);
+
+lives_ok(sub {
+ $rs->first->get_column('cdid')
+}, 'columns 1st rscolumn present');
+
+lives_ok(sub {
+ $rs->first->get_column('title')
+}, 'columns 2nd rscolumn present');
+
+lives_ok(sub {
+ $rs->first->artist->get_column('name')
+}, 'columns 3rd rscolumn present');
+
+
+
+$rs = $schema->resultset('CD')->search({},
+ {
+ 'join' => 'artist',
+ '+columns' => ['cdid', 'title', 'artist.name'],
+ }
+);
+
+($sql, @bind) = @${$rs->as_query};
+is_same_sql_bind (
+ $sql,
+ \@bind,
+ '(SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track, me.cdid, me.title, artist.name FROM cd me JOIN artist artist ON artist.artistid = me.artist)',
+ [],
+ 'Use of columns attribute results in proper sql'
+);
+
+lives_ok(sub {
+ $rs->first->get_column('cdid')
+}, 'columns 1st rscolumn present');
+
+lives_ok(sub {
+ $rs->first->get_column('title')
+}, 'columns 2nd rscolumn present');
+
+lives_ok(sub {
+ $rs->first->artist->get_column('name')
+}, 'columns 3rd rscolumn present');
+
+
+$rs = $schema->resultset('CD')->search({'tracks.position' => { -in => [2] } },
+ {
+ join => 'tracks',
+ columns => [qw/me.cdid me.title/],
+ '+select' => ['tracks.position'],
+ '+as' => ['track_position'],
+
+ # get a hashref of CD1 only (the first with a second track)
+ result_class => 'DBIx::Class::ResultClass::HashRefInflator',
+ order_by => 'cdid',
+ rows => 1,
+ }
+);
+
+is_deeply (
+ $rs->single,
+ {
+ cdid => 1,
+ track_position => 2,
+ title => 'Spoonful of bees',
+ },
+ 'limited prefetch via column works on a multi-relationship',
+);
+
+my $sub_rs = $rs->search ({},
+ {
+ columns => [qw/artist tracks.trackid/], # columns should not be merged but override $rs columns
+ '+select' => ['tracks.title'],
+ '+as' => ['tracks.title'],
+ }
+);
+
+is_deeply (
+ $sub_rs->single,
+ {
+ artist => 1,
+ track_position => 2,
+ tracks =>
+ {
+ trackid => 17,
+ title => 'Apiary',
+ },
+ },
+ 'columns/select/as fold properly on sub-searches',
+);
+
+TODO: {
+ local $TODO = "Multi-collapsing still doesn't work right - HRI should be getting an arrayref, not an individual hash";
+ is_deeply (
+ $sub_rs->single,
+ {
+ artist => 1,
+ track_position => 2,
+ tracks => [
+ {
+ trackid => 17,
+ title => 'Apiary',
+ },
+ ],
+ },
+ 'columns/select/as fold properly on sub-searches',
+ );
+}
Modified: DBIx-Class/0.08/branches/multi_stuff/t/81transactions.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/81transactions.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/81transactions.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -272,7 +272,7 @@
ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
- eval {
+ lives_ok (sub {
my $w;
local $SIG{__WARN__} = sub { $w = shift };
@@ -281,32 +281,27 @@
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');
- };
+ ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
+ }, 'rollback successful withot exception');
- local $TODO = "Work out how this should work";
- is($@, "Not sure what we want here, but something", "Rollback okay");
-
- ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
-
sub outer {
my ($schema) = @_;
-
+
my $guard = $schema->txn_scope_guard;
$schema->resultset('Artist')->create({
name => 'Death Cab for Cutie',
});
inner(@_);
- $guard->commit;
}
sub inner {
my ($schema, $fatal) = @_;
- my $guard = $schema->txn_scope_guard;
+ my $inner_guard = $schema->txn_scope_guard;
+ is($schema->storage->transaction_depth, 2, "Correct transaction depth");
+
my $artist = $artist_rs->find({ name => 'Death Cab for Cutie' });
- is($schema->storage->transaction_depth, 2, "Correct transaction depth");
- undef $@;
eval {
$artist->cds->create({
title => 'Plans',
@@ -320,6 +315,7 @@
die $@;
}
- # See what happens if we dont $guard->commit;
+ # inner guard should commit without consequences
+ $inner_guard->commit;
}
}
Modified: DBIx-Class/0.08/branches/multi_stuff/t/89dbicadmin.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/89dbicadmin.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/89dbicadmin.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -21,7 +21,6 @@
plan tests => $tests_per_run * @json_backends;
-use JSON::Any;
for my $js (@json_backends) {
eval {JSON::Any->import ($js) };
Modified: DBIx-Class/0.08/branches/multi_stuff/t/90ensure_class_loaded.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/90ensure_class_loaded.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/90ensure_class_loaded.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -64,12 +64,9 @@
q/0;/,
);
- TODO: {
- local $TODO = "Current load_optional_class cannot find PAR";
- $retval = eval { $schema->load_optional_class('VIRTUAL::PAR::PACKAGE') };
- ok( $@, 'load_optional_class of a no-true-returning PAR module did throw' );
- ok( !$retval, 'no-true-returning PAR package not loaded' );
- }
+ $retval = eval { $schema->load_optional_class('VIRTUAL::PAR::PACKAGE') };
+ ok( $@, 'load_optional_class of a no-true-returning PAR module did throw' );
+ ok( !$retval, 'no-true-returning PAR package not loaded' );
# simulate a normal class (no one adjusted %INC so it will be tried again
@code = (
@@ -77,12 +74,9 @@
q/1;/,
);
- TODO: {
- local $TODO = "Current load_optional_class cannot find PARs";
- $retval = eval { $schema->load_optional_class('VIRTUAL::PAR::PACKAGE') };
- ok( !$@, 'load_optional_class of a PAR module did not throw' );
- ok( $retval, 'PAR package "loaded"' );
- }
+ $retval = eval { $schema->load_optional_class('VIRTUAL::PAR::PACKAGE') };
+ ok( !$@, 'load_optional_class of a PAR module did not throw' );
+ ok( $retval, 'PAR package "loaded"' );
# see if we can still load stuff with the coderef present
$retval = eval { $schema->load_optional_class('DBIx::Class::ResultClass::HashRefInflator') };
Modified: DBIx-Class/0.08/branches/multi_stuff/t/93single_accessor_object.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/93single_accessor_object.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/93single_accessor_object.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -56,7 +56,7 @@
{
my $artist = $schema->resultset('Artist')->create({ artistid => 666, name => 'bad religion' });
- my $genre = $schema->resultset('Genre')->create({ genreid => 88, name => 'disco', demographicid => 1 });
+ my $genre = $schema->resultset('Genre')->create({ genreid => 88, name => 'disco' });
my $cd = $schema->resultset('CD')->create({ cdid => 187, artist => 1, title => 'how could hell be any worse?', year => 1982 });
dies_ok { $cd->genre } 'genre accessor throws without column';
Modified: DBIx-Class/0.08/branches/multi_stuff/t/96multi_create_torture.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/96multi_create_torture.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/96multi_create_torture.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -27,9 +27,6 @@
year => '2012',
genre => {
name => '"Greatest" collections',
- demographic => {
- name => '"Greatest" collections demographic',
- },
},
tags => [
{ tag => 'A' },
@@ -50,9 +47,6 @@
year => 2012,
genre => {
name => '"Greatest" collections',
- demographic => {
- name => '"Greatest" collections demographic',
- },
},
tags => [
{ tag => 'A' },
@@ -74,9 +68,6 @@
year => 2012,
genre => {
name => '"Greatest" collections',
- demographic => {
- name => '"Greatest" collections demographic',
- },
},
tags => [
{ tag => 'A' },
@@ -88,9 +79,6 @@
year => 2012,
genre => {
name => '"Greatest" collections2',
- demographic => {
- name => '"Greatest" collections demographic',
- },
},
tags => [
{ tag => 'A' },
@@ -103,9 +91,6 @@
year => 2013,
genre => {
name => '"Greatest" collections2',
- demographic => {
- name => '"Greatest" collections demographic',
- },
},
}},
],
@@ -118,9 +103,6 @@
year => 2012,
genre => {
name => '"Greatest" collections',
- demographic => {
- name => '"Greatest" collections demographic',
- },
},
tags => [
{ tag => 'A' },
Modified: DBIx-Class/0.08/branches/multi_stuff/t/99dbic_sqlt_parser.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/99dbic_sqlt_parser.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/99dbic_sqlt_parser.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -7,9 +7,9 @@
BEGIN {
- eval "use DBD::mysql; use SQL::Translator 0.09003;";
+ eval "use SQL::Translator 0.09003;";
if ($@) {
- plan skip_all => 'needs DBD::mysql and SQL::Translator 0.09003 for testing';
+ plan skip_all => 'needs SQL::Translator 0.09003 for testing';
}
}
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/01-columns.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/01-columns.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/01-columns.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,6 +1,7 @@
use strict;
use Test::More;
+use lib 't/cdbi/testlib';
BEGIN {
eval "use DBIx::Class::CDBICompat;";
@@ -13,7 +14,7 @@
#-----------------------------------------------------------------------
package State;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
State->table('State');
State->columns(Essential => qw/Abbreviation Name/);
@@ -39,7 +40,7 @@
package City;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
City->table('City');
City->columns(All => qw/Name State Population/);
@@ -56,7 +57,7 @@
#-------------------------------------------------------------------------
package CD;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
CD->table('CD');
CD->columns('All' => qw/artist title length/);
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/columns_dont_override_custom_accessors.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/columns_dont_override_custom_accessors.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/columns_dont_override_custom_accessors.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,5 +1,6 @@
use strict;
use Test::More;
+use lib 't/cdbi/testlib';
BEGIN {
eval "use DBIx::Class::CDBICompat;";
@@ -10,7 +11,7 @@
{
package Thing;
- use base 'DBIx::Class::Test::SQLite';
+ use base 'DBIC::Test::SQLite';
Thing->columns(TEMP => qw[foo bar]);
Thing->columns(All => qw[thing_id yarrow flower]);
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/copy.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/copy.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/copy.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -15,7 +15,7 @@
package # hide from PAUSE
MyFilm;
- use base 'DBIx::Class::Test::SQLite';
+ use base 'DBIC::Test::SQLite';
use strict;
__PACKAGE__->set_table('Movies');
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/multi_column_set.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/multi_column_set.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/multi_column_set.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,5 +1,6 @@
use strict;
use Test::More;
+use lib 't/cdbi/testlib';
BEGIN {
eval "use DBIx::Class::CDBICompat;";
@@ -10,7 +11,7 @@
{
package Thing;
- use base 'DBIx::Class::Test::SQLite';
+ use base 'DBIC::Test::SQLite';
Thing->columns(TEMP => qw[foo bar baz]);
Thing->columns(All => qw[some real stuff]);
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_to_undef.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_to_undef.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_to_undef.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,5 +1,6 @@
use strict;
use Test::More;
+use lib 't/cdbi/testlib';
BEGIN {
eval "use DBIx::Class::CDBICompat;";
@@ -19,7 +20,7 @@
{
package Thing;
- use base 'DBIx::Class::Test::SQLite';
+ use base 'DBIC::Test::SQLite';
Thing->columns(All => qw[thing_id this that date]);
}
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_vs_DateTime.t
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_vs_DateTime.t 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/set_vs_DateTime.t 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,6 +1,7 @@
use strict;
use Test::More;
use Test::Exception;
+use lib 't/cdbi/testlib';
BEGIN {
eval "use DBIx::Class::CDBICompat;";
@@ -13,7 +14,7 @@
{
package Thing;
- use base 'DBIx::Class::Test::SQLite';
+ use base 'DBIC::Test::SQLite';
Thing->columns(All => qw[thing_id this that date]);
}
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Actor.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Actor.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Actor.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
__PACKAGE__->set_table('Actor');
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/ActorAlias.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/ActorAlias.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/ActorAlias.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
__PACKAGE__->set_table( 'ActorAlias' );
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Blurb.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Blurb.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Blurb.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -2,7 +2,7 @@
Blurb;
use strict;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
__PACKAGE__->set_table('Blurbs');
__PACKAGE__->columns('Primary', 'Title');
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/CDBase.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/CDBase.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/CDBase.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -2,6 +2,6 @@
CDBase;
use strict;
-use base qw(DBIx::Class::Test::SQLite);
+use base qw(DBIC::Test::SQLite);
1;
Copied: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/DBIC/Test (from rev 5335, DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Test)
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/DBIC/Test/SQLite.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Test/SQLite.pm 2009-01-21 16:16:23 UTC (rev 5335)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/DBIC/Test/SQLite.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,4 +1,5 @@
-package DBIx::Class::Test::SQLite;
+package # hide from PAUSE
+ DBIC::Test::SQLite;
=head1 NAME
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Director.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Director.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Director.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -2,7 +2,7 @@
Director;
use strict;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
__PACKAGE__->set_table('Directors');
__PACKAGE__->columns('All' => qw/ Name Birthday IsInsane /);
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Film.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Film.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Film.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,7 +1,7 @@
package # hide from PAUSE
Film;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
use strict;
__PACKAGE__->set_table('Movies');
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Lazy.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Lazy.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Lazy.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,7 +1,7 @@
package # hide from PAUSE
Lazy;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
use strict;
__PACKAGE__->set_table("Lazy");
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Order.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Order.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Order.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -2,7 +2,7 @@
Order;
use strict;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
__PACKAGE__->set_table('orders');
__PACKAGE__->table_alias('orders');
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/OtherThing.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/OtherThing.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/OtherThing.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,5 +1,5 @@
package OtherThing;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
OtherThing->set_table("other_thing");
OtherThing->columns(All => qw(id));
Modified: DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Thing.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Thing.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/cdbi/testlib/Thing.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,5 +1,5 @@
package Thing;
-use base 'DBIx::Class::Test::SQLite';
+use base 'DBIC::Test::SQLite';
Thing->set_table("thing");
Thing->columns(All => qw(id that_thing));
Modified: DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/CD.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/CD.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/CD.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -38,7 +38,9 @@
});
# in case this is a single-cd it promotes a track from another cd
-__PACKAGE__->belongs_to( single_track => 'DBICTest::Schema::Track' );
+__PACKAGE__->belongs_to( single_track => 'DBICTest::Schema::Track', 'single_track',
+ { join_type => 'left'}
+);
__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track' );
__PACKAGE__->has_many(
Deleted: DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Demographic.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Demographic.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Demographic.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,21 +0,0 @@
-package DBICTest::Schema::Demographic;
-
-use strict;
-
-use base 'DBIx::Class::Core';
-
-__PACKAGE__->table('demographic');
-__PACKAGE__->add_columns(
- demographicid => {
- data_type => 'integer',
- is_auto_increment => 1,
- },
- name => {
- data_type => 'varchar',
- size => 100,
- },
-);
-__PACKAGE__->set_primary_key('demographicid');
-__PACKAGE__->add_unique_constraint ( demographic_name => [qw/name/] );
-
-1;
Modified: DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Genre.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Genre.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema/Genre.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -14,15 +14,10 @@
data_type => 'varchar',
size => 100,
},
- demographicid => {
- data_type => 'integer',
- is_nullable => 0,
- },
);
__PACKAGE__->set_primary_key('genreid');
__PACKAGE__->add_unique_constraint ( genre_name => [qw/name/] );
__PACKAGE__->has_many (cds => 'DBICTest::Schema::CD', 'genreid');
-__PACKAGE__->belongs_to (demographic => 'DBICTest::Schema::Demographic', 'demographicid');
1;
Modified: DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema.pm 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/lib/DBICTest/Schema.pm 2009-04-30 08:56:15 UTC (rev 6039)
@@ -11,7 +11,6 @@
BindType
Employee
CD
- Demographic
FileColumn
Genre
Link
Modified: DBIx-Class/0.08/branches/multi_stuff/t/lib/sqlite.sql
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/t/lib/sqlite.sql 2009-04-30 08:28:04 UTC (rev 6038)
+++ DBIx-Class/0.08/branches/multi_stuff/t/lib/sqlite.sql 2009-04-30 08:56:15 UTC (rev 6039)
@@ -1,6 +1,6 @@
--
-- Created by SQL::Translator::Producer::SQLite
--- Created on Sun Apr 19 11:49:48 2009
+-- Created on Thu Apr 30 10:04:57 2009
--
@@ -137,16 +137,6 @@
CREATE INDEX collection_object_idx_object_c ON collection_object (object);
--
--- Table: demographic
---
-CREATE TABLE demographic (
- demographicid INTEGER PRIMARY KEY NOT NULL,
- name varchar(100) NOT NULL
-);
-
-CREATE UNIQUE INDEX demographic_name_demographic ON demographic (name);
-
---
-- Table: employee
--
CREATE TABLE employee (
@@ -231,12 +221,9 @@
--
CREATE TABLE genre (
genreid INTEGER PRIMARY KEY NOT NULL,
- name varchar(100) NOT NULL,
- demographicid integer NOT NULL
+ name varchar(100) NOT NULL
);
-CREATE INDEX genre_idx_demographicid_genre ON genre (demographicid);
-
CREATE UNIQUE INDEX genre_name_genre ON genre (name);
--
More information about the Bast-commits
mailing list