[Bast-commits] r6107 - in DBIx-Class/0.08/branches/count_distinct:
. lib/DBIx lib/DBIx/Class lib/DBIx/Class/Manual
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
arcanez at dev.catalyst.perl.org
arcanez at dev.catalyst.perl.org
Sat May 2 08:36:03 GMT 2009
Author: arcanez
Date: 2009-05-02 08:36:02 +0000 (Sat, 02 May 2009)
New Revision: 6107
Added:
DBIx-Class/0.08/branches/count_distinct/t/63register_source.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/DBIC/
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/DBIC/Test/
Removed:
DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Demographic.pm
DBIx-Class/0.08/branches/count_distinct/t/lib/Test/
Modified:
DBIx-Class/0.08/branches/count_distinct/
DBIx-Class/0.08/branches/count_distinct/Changes
DBIx-Class/0.08/branches/count_distinct/Makefile.PL
DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class.pm
DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Cookbook.pod
DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Glossary.pod
DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Row.pm
DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Schema.pm
DBIx-Class/0.08/branches/count_distinct/lib/SQL/Translator/Parser/DBIx/Class.pm
DBIx-Class/0.08/branches/count_distinct/t/64db.t
DBIx-Class/0.08/branches/count_distinct/t/66relationship.t
DBIx-Class/0.08/branches/count_distinct/t/72pg.t
DBIx-Class/0.08/branches/count_distinct/t/76select.t
DBIx-Class/0.08/branches/count_distinct/t/81transactions.t
DBIx-Class/0.08/branches/count_distinct/t/93single_accessor_object.t
DBIx-Class/0.08/branches/count_distinct/t/96multi_create_torture.t
DBIx-Class/0.08/branches/count_distinct/t/99dbic_sqlt_parser.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/01-columns.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/columns_dont_override_custom_accessors.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/copy.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/multi_column_set.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/set_to_undef.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/set_vs_DateTime.t
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Actor.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/ActorAlias.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Blurb.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/CDBase.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/DBIC/Test/SQLite.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Director.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Film.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Lazy.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Order.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/OtherThing.pm
DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Thing.pm
DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema.pm
DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/CD.pm
DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Genre.pm
DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql
Log:
r5987 at mullet (orig r5986): castaway | 2009-04-25 02:59:28 -0700
Docs on using multiple db schemas (from abraxxa maybe, I forget)
Docs on setting result_class from agaran
r5988 at mullet (orig r5987): ribasushi | 2009-04-27 01:03:58 -0700
Refactor the (almost obsolete) DBD::SQLite check not to fork() within win32
r5989 at mullet (orig r5988): ribasushi | 2009-04-27 01:05:43 -0700
Whops, we don't exit under win32
r5990 at mullet (orig r5989): ribasushi | 2009-04-27 01:14:38 -0700
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 mullet (orig r5990): ribasushi | 2009-04-27 02:11:15 -0700
Release 0.08101
r5995 at mullet (orig r5994): arcanez | 2009-04-28 00:05:53 -0700
change from DB::Schema to My::Schema
add ::Result:: as necessary (load_namespaces instead of load_classes)
r5996 at mullet (orig r5995): ribasushi | 2009-04-28 02:12:33 -0700
Fix a todo and some minor test adjustments
r5997 at mullet (orig r5996): ribasushi | 2009-04-28 02:35:31 -0700
Bogus test dependency
r6003 at mullet (orig r6002): arcanez | 2009-04-28 13:20:42 -0700
fix for columns => [ ... ] issue
r6014 at mullet (orig r6013): arcanez | 2009-04-28 16:16:48 -0700
test for prefetch by columns
r6016 at mullet (orig r6015): ribasushi | 2009-04-29 01:22:16 -0700
test and patch for failing mini-prefetch via columns (arcanez++)
r6017 at mullet (orig r6016): ribasushi | 2009-04-29 01:23:25 -0700
Add two TODOs by arcanez (not sure about those)
r6018 at mullet (orig r6017): ribasushi | 2009-04-29 01:24:20 -0700
Add TODOs illustrating a problem with as_query
r6019 at mullet (orig r6018): arcanez | 2009-04-29 05:47:03 -0700
untodo/fix test
r6020 at mullet (orig r6019): ribasushi | 2009-04-29 06:39:27 -0700
Strip out inane todo
r6021 at mullet (orig r6020): ribasushi | 2009-04-29 06:40:03 -0700
Forgotten debugging
r6022 at mullet (orig r6021): ribasushi | 2009-04-29 06:41:37 -0700
Fixes to massive breakage introduced by 5948 ribasushi--
r6023 at mullet (orig r6022): ribasushi | 2009-04-29 06:47:23 -0700
Changes
r6024 at mullet (orig r6023): jasonmay | 2009-04-29 08:18:11 -0700
allow multiple classless sources to be registered without dying
r6025 at mullet (orig r6024): jasonmay | 2009-04-29 09:47:26 -0700
add jasonmay to list of contributors
r6034 at mullet (orig r6033): ribasushi | 2009-04-29 23:53:51 -0700
Add tests for r6002
r6036 at mullet (orig r6035): ribasushi | 2009-04-30 01:12:23 -0700
Revert addition of superficial relationship in r5886
r6039 at mullet (orig r6038): ribasushi | 2009-04-30 01:28:04 -0700
Release 0.08102
Property changes on: DBIx-Class/0.08/branches/count_distinct
___________________________________________________________________
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/multi_stuff:5565
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/on_disconnect_do:3694
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/oracle_sequence:4173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/parser_fk_index:4485
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/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:5979
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/multi_stuff:5565
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/on_disconnect_do:3694
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/oracle_sequence:4173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/parser_fk_index:4485
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/DBIx-Class/0.08/branches/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/count_distinct/Changes
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/Changes 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/Changes 2009-05-02 08:36:02 UTC (rev 6107)
@@ -1,10 +1,22 @@
Revision history for DBIx::Class
- - Fix +select, +as, +columns and include_columns being stripped from
- ->get_columns
- - move load_optional_class from DBIx::Class::Componentised to Class::C3::Componentised
+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.081000 2009-04-19 11:39:35 (UTC)
+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)
Modified: DBIx-Class/0.08/branches/count_distinct/Makefile.PL
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/Makefile.PL 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/Makefile.PL 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/lib/DBIx/Class/Manual/Cookbook.pod
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Cookbook.pod 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Cookbook.pod 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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
@@ -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/count_distinct/lib/DBIx/Class/Manual/Glossary.pod
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Glossary.pod 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Glossary.pod 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSet.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSet.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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 {
@@ -2382,12 +2387,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/count_distinct/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Row.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Row.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Schema.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Schema.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -1280,6 +1280,7 @@
$self->source_registrations(\%reg);
return if ($params->{extra});
+ return unless defined($rs_class) && $rs_class->can('result_source_instance');
my %map = %{$self->class_mappings};
if (
Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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>
Modified: DBIx-Class/0.08/branches/count_distinct/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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
Added: DBIx-Class/0.08/branches/count_distinct/t/63register_source.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/63register_source.t (rev 0)
+++ DBIx-Class/0.08/branches/count_distinct/t/63register_source.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/64db.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/64db.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/64db.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/66relationship.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/66relationship.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/66relationship.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/72pg.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/72pg.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/72pg.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -162,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');
Modified: DBIx-Class/0.08/branches/count_distinct/t/76select.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/76select.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/76select.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -5,10 +5,11 @@
use Test::Exception;
use lib qw(t/lib);
use DBICTest;
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
-plan tests => 13;
+plan tests => 24;
my $rs = $schema->resultset('CD')->search({},
{
@@ -73,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/count_distinct/t/81transactions.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/81transactions.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/81transactions.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/93single_accessor_object.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/93single_accessor_object.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/93single_accessor_object.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/96multi_create_torture.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/96multi_create_torture.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/96multi_create_torture.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/99dbic_sqlt_parser.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/99dbic_sqlt_parser.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/99dbic_sqlt_parser.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/01-columns.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/01-columns.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/01-columns.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/columns_dont_override_custom_accessors.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/columns_dont_override_custom_accessors.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/columns_dont_override_custom_accessors.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/copy.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/copy.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/copy.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/multi_column_set.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/multi_column_set.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/multi_column_set.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/set_to_undef.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/set_to_undef.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/set_to_undef.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/set_vs_DateTime.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/set_vs_DateTime.t 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/set_vs_DateTime.t 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/Actor.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Actor.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Actor.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/ActorAlias.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/ActorAlias.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/ActorAlias.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/Blurb.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Blurb.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Blurb.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/CDBase.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/CDBase.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/CDBase.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/DBIC/Test (from rev 5983, DBIx-Class/0.08/branches/count_distinct/t/lib/Test)
Modified: DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/DBIC/Test/SQLite.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/Test/SQLite.pm 2009-04-24 19:51:16 UTC (rev 5983)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/DBIC/Test/SQLite.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -1,5 +1,5 @@
package # hide from PAUSE
- DBIx::Class::Test::SQLite;
+ DBIC::Test::SQLite;
=head1 NAME
Modified: DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Director.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Director.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Director.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/Film.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Film.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Film.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/Lazy.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Lazy.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Lazy.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/Order.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Order.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Order.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/OtherThing.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/OtherThing.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/OtherThing.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/cdbi/testlib/Thing.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Thing.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/Thing.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/lib/DBICTest/Schema/CD.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/CD.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/CD.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/lib/DBICTest/Schema/Demographic.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Demographic.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Demographic.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/lib/DBICTest/Schema/Genre.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Genre.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Genre.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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/count_distinct/t/lib/DBICTest/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema.pm 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema.pm 2009-05-02 08:36:02 UTC (rev 6107)
@@ -11,7 +11,6 @@
BindType
Employee
CD
- Demographic
FileColumn
Genre
Link
Modified: DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql 2009-05-02 01:33:47 UTC (rev 6106)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql 2009-05-02 08:36:02 UTC (rev 6107)
@@ -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