[Bast-commits] r5983 - in DBIx-Class/0.08/branches/count_distinct: . lib/DBIx lib/DBIx/Class lib/DBIx/Class/CDBICompat lib/DBIx/Class/InflateColumn lib/DBIx/Class/Manual lib/DBIx/Class/Relationship lib/DBIx/Class/ResultClass lib/DBIx/Class/Schema lib/DBIx/Class/Storage lib/DBIx/Class/Storage/DBI t t/cdbi t/cdbi/testlib t/lib t/lib/DBICTest t/lib/DBICTest/Schema t/lib/Test t/search

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Fri Apr 24 19:51:16 GMT 2009


Author: ribasushi
Date: 2009-04-24 20:51:16 +0100 (Fri, 24 Apr 2009)
New Revision: 5983

Added:
   DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Demographic.pm
   DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZDeprecated.pm
   DBIx-Class/0.08/branches/count_distinct/t/lib/Test/
Removed:
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Test/
Modified:
   DBIx-Class/0.08/branches/count_distinct/
   DBIx-Class/0.08/branches/count_distinct/Changes
   DBIx-Class/0.08/branches/count_distinct/MANIFEST.SKIP
   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/CDBICompat/AbstractSearch.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/ColumnGroups.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Copy.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Iterator.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Relationship.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Relationships.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Retrieve.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Componentised.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/DB.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/InflateColumn/DateTime.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/Reading.pod
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Troubleshooting.pod
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Relationship/BelongsTo.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultClass/HashRefInflator.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSet.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSetColumn.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSource.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSourceHandle.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/DBIx/Class/Schema/Versioned.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/DBI.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/DBI/SQLite.pm
   DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/TxnScopeGuard.pm
   DBIx-Class/0.08/branches/count_distinct/t/04dont_break_c3.t
   DBIx-Class/0.08/branches/count_distinct/t/100extra_source.t
   DBIx-Class/0.08/branches/count_distinct/t/19quotes.t
   DBIx-Class/0.08/branches/count_distinct/t/19quotes_newstyle.t
   DBIx-Class/0.08/branches/count_distinct/t/33storage_reconnect.t
   DBIx-Class/0.08/branches/count_distinct/t/39load_namespaces_rt41083.t
   DBIx-Class/0.08/branches/count_distinct/t/63register_class.t
   DBIx-Class/0.08/branches/count_distinct/t/66relationship.t
   DBIx-Class/0.08/branches/count_distinct/t/71mysql.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/80unique.t
   DBIx-Class/0.08/branches/count_distinct/t/89dbicadmin.t
   DBIx-Class/0.08/branches/count_distinct/t/89inflate_datetime.t
   DBIx-Class/0.08/branches/count_distinct/t/91debug.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/cdbi/02-Film.t
   DBIx-Class/0.08/branches/count_distinct/t/cdbi/15-accessor.t
   DBIx-Class/0.08/branches/count_distinct/t/cdbi/22-deflate_order.t
   DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/MyBase.pm
   DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema.pm
   DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZ.pm
   DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Genre.pm
   DBIx-Class/0.08/branches/count_distinct/t/lib/Test/SQLite.pm
   DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql
   DBIx-Class/0.08/branches/count_distinct/t/search/subquery.t
Log:
 r5759 at Thesaurus (orig r5758):  arcanez | 2009-03-15 17:14:56 +0100
 update Makefile.PL to require latest C3, C3::Componentised, MRO::Compat
 r5761 at Thesaurus (orig r5760):  arcanez | 2009-03-16 20:53:34 +0100
  * change search_literal to use \[] when passing into search (help with binding order)
  * provide documentation on how to use search instead of search_literal
 
 
 r5762 at Thesaurus (orig r5761):  plu | 2009-03-17 16:31:08 +0100
 putting IC::DateTime locale, timezone or floating_tz_ok attributes into extra => {} has been deprecated. The new way is to put these things directly into the columns definition
 r5764 at Thesaurus (orig r5763):  ribasushi | 2009-03-18 00:57:49 +0100
 Basic binary op logic FAIL
 r5769 at Thesaurus (orig r5768):  rafl | 2009-03-18 20:02:07 +0100
 Use MRO::Compat instead of Class::C3 directly.
 r5770 at Thesaurus (orig r5769):  rafl | 2009-03-18 20:02:23 +0100
 Depend on the latest C3::Componentised so we use mro:: on 5.10 and Class::C3 on 5.8.
 r5773 at Thesaurus (orig r5772):  robkinyon | 2009-03-19 18:05:00 +0100
 Special-case handling for (undef,undef) passed to search_rs()
 r5777 at Thesaurus (orig r5776):  robkinyon | 2009-03-19 21:35:37 +0100
 Moved some SQL parsing of ORDER BY from _select_args() to retrieve_from_sql() where it belongs
 r5779 at Thesaurus (orig r5778):  robkinyon | 2009-03-19 21:52:54 +0100
 Commit another fix for arcanez to test
 r5780 at Thesaurus (orig r5779):  robkinyon | 2009-03-19 22:07:06 +0100
 Commit another fix for arcanez to test
 r5785 at Thesaurus (orig r5784):  wdh | 2009-03-20 16:23:40 +0100
 clarify need for scalarref when using db functions with 'default_value' attribute
 r5787 at Thesaurus (orig r5786):  solomon | 2009-03-20 22:41:49 +0100
 Add cookbook entry for dealing with runaway prepared statement cache
 r5792 at Thesaurus (orig r5791):  groditi | 2009-03-22 02:10:30 +0100
 adding test for exception if nullable rel call is not explicitly defined as undef on insert
 r5793 at Thesaurus (orig r5792):  ribasushi | 2009-03-22 22:09:22 +0100
 New SQLA::Test handles () differences *much* better, thus fixing the tests
 r5804 at Thesaurus (orig r5803):  groditi | 2009-03-23 19:16:41 +0100
 skip test doc issue relating to db-side defaults
 r5809 at Thesaurus (orig r5808):  jmmills | 2009-03-24 08:49:54 +0100
 Fixed _register_source to not produce 'register_extra_source' warnings
 when "registering class" isa (or is a sub-class) source class.
 This is not exactly an elegant fix as I had to pass a hash key (as _to_register via $params) with the original source class instance; I was not able to determine inheritance via the result_source_instance (ResultSource::Table) object.
  
 r5816 at Thesaurus (orig r5815):  robkinyon | 2009-03-26 02:09:55 +0100
 Deprecated search_like()
 r5817 at Thesaurus (orig r5816):  lukes | 2009-03-26 10:13:18 +0100
 changed my nick in contribs section
 r5820 at Thesaurus (orig r5819):  castaway | 2009-03-26 14:54:09 +0100
 Improved  metapod docs
 
 r5823 at Thesaurus (orig r5822):  nigel | 2009-03-27 13:21:14 +0100
  r11142 at hex:  nigel | 2009-03-27 12:20:55 +0000
  Removed Cookbook section on pagers that stated page attribute was not required.
  [Since the pager throws an exception if the pager attribute is not specified, 
  this was completely wrong]
 
 r5824 at Thesaurus (orig r5823):  norbi | 2009-03-27 13:30:00 +0100
  r5969 at vger:  mendel | 2009-03-27 13:29:24 +0100
   * Fixed the alphabetical order of the contributors list (that I screwed up, sorry).
 
 r5831 at Thesaurus (orig r5830):  ribasushi | 2009-03-28 22:46:34 +0100
 Bump SQLA and CAG dependencies
 r5832 at Thesaurus (orig r5831):  ribasushi | 2009-03-28 23:05:35 +0100
 Clarify DBIC behavior wrt RDBMS default values
 r5833 at Thesaurus (orig r5832):  ribasushi | 2009-03-29 10:31:47 +0200
 detabify
 r5836 at Thesaurus (orig r5835):  ribasushi | 2009-03-29 10:49:32 +0200
 detabify
 r5837 at Thesaurus (orig r5836):  ribasushi | 2009-03-29 12:06:02 +0200
 Revert r5808 - this is NOT a bug, the warning IS correct
 r5838 at Thesaurus (orig r5837):  ribasushi | 2009-03-29 12:18:19 +0200
 Adjust parenthesis to pass with latest SQLA
 r5839 at Thesaurus (orig r5838):  ribasushi | 2009-03-29 12:22:49 +0200
 Remove failing test before branching
 r5847 at Thesaurus (orig r5846):  ribasushi | 2009-03-30 01:05:37 +0200
 Take experimental off TxnScopeGuard
 r5848 at Thesaurus (orig r5847):  ribasushi | 2009-03-30 01:44:40 +0200
 Dev-Release 0.08099_08
 r5852 at Thesaurus (orig r5851):  castaway | 2009-03-31 08:41:42 +0200
 Fix my email address in AUTHOR
 
 r5859 at Thesaurus (orig r5858):  plu | 2009-04-07 16:15:32 +0200
 Added caveat notes to dual trick in cookbook
 r5864 at Thesaurus (orig r5863):  jmmills | 2009-04-08 21:28:16 +0200
  r81350 at ofelia (orig r5840):  ribasushi | 2009-03-29 03:30:21 -0700
  Re-add failing test
 
 r5875 at Thesaurus (orig r5874):  arcanez | 2009-04-09 15:35:46 +0200
 require DBD::SQLite 1.21+
 r5885 at Thesaurus (orig r5884):  caelum | 2009-04-13 14:47:47 +0200
 add test for connect_info hashref
 r5887 at Thesaurus (orig r5886):  pcc | 2009-04-13 20:35:51 +0200
 Correctly propagate forced left joins through arrayrefs and hashrefs
 r5889 at Thesaurus (orig r5888):  caelum | 2009-04-15 15:47:53 +0200
 duplicate
 r5891 at Thesaurus (orig r5890):  plu | 2009-04-17 10:10:19 +0200
 Added update_or_new to ResultSet.pm
 r5903 at Thesaurus (orig r5902):  ilmari | 2009-04-18 20:38:44 +0200
 Don't warn when reregistering a source under the same name
 r5913 at Thesaurus (orig r5912):  matthewt | 2009-04-19 16:52:15 +0200
 0.08100 release
 r5916 at Thesaurus (orig r5915):  arcanez | 2009-04-21 00:07:07 +0200
 move load_optional_class into Class::C3::Componentised
 
 r5923 at Thesaurus (orig r5922):  ribasushi | 2009-04-21 10:37:11 +0200
 New SQLite kicks ass - remove some warning silencers and reinstantiate tests
 r5924 at Thesaurus (orig r5923):  ribasushi | 2009-04-21 10:51:03 +0200
 Multiple cdbi-compat test cleanups
 Clarify search_like deprecation
 r5925 at Thesaurus (orig r5924):  ribasushi | 2009-04-21 10:51:59 +0200
 More author test-requires
 r5926 at Thesaurus (orig r5925):  ribasushi | 2009-04-21 10:53:35 +0200
 t/ janitorial work
 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



Property changes on: DBIx-Class/0.08/branches/count_distinct
___________________________________________________________________
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:5635
9c88509d-e914-0410-b01c-b9530614cbfe:/local/DBIx-Class:32260
9c88509d-e914-0410-b01c-b9530614cbfe:/local/DBIx-Class-CDBICompat:54993
9c88509d-e914-0410-b01c-b9530614cbfe:/vendor/DBIx-Class:31122
ab17426e-7cd3-4704-a2a2-80b7c0a611bb:/local/dbic_column_attr:10946
ab17426e-7cd3-4704-a2a2-80b7c0a611bb:/local/dbic_trunk:10954
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/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:/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: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

Modified: DBIx-Class/0.08/branches/count_distinct/Changes
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/Changes	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/Changes	2009-04-24 19:51:16 UTC (rev 5983)
@@ -1,5 +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.081000 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)
+        - Fixed taint mode with load_namespaces
+        - Putting IC::DateTime locale, timezone or floating_tz_ok attributes into
+          extra => {} has been deprecated. The new way is to put these things
+          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.
+        - TxnScopeGuard left experimental state
+
 0.08099_07 2009-02-27 02:00:00 (UTC)
         - multi-create using find_or_create rather than _related for post-insert
         - fix get_inflated_columns to check has_column_loaded
@@ -13,11 +30,11 @@
         - Split sql statements for deploy only if SQLT::Producer returned a scalar
           containing all statements to be executed
         - Add as_query() for ResultSet and ResultSetColumn. This makes subqueries
-          possible. See the Cookbook for details. (robkinyon, michaelr)
+          possible. See the Cookbook for details.
         - Massive rewrite of Ordered to properly handle position constraints and
           to make it more matpath-friendly
         - deploy_statements called ddl_filename with the $version and $dir arguments
-          in the wrong order. 
+          in the wrong order.
         - columns/+columns attributes now support { as => select } hahsrefs
         - support for views both in DBIC and via deploy() in SQLT
 
@@ -41,11 +58,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/count_distinct/MANIFEST.SKIP
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/MANIFEST.SKIP	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/MANIFEST.SKIP	2009-04-24 19:51:16 UTC (rev 5983)
@@ -1,3 +1,6 @@
+^(?!script/|examples/|lib/|inc/|t/|Makefile.PL$|README$|MANIFEST$|Changes$|META.yml$)
+
+
 # Avoid version control files.
 \bRCS\b
 \bCVS\b

Modified: DBIx-Class/0.08/branches/count_distinct/Makefile.PL
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/Makefile.PL	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/Makefile.PL	2009-04-24 19:51:16 UTC (rev 5983)
@@ -9,29 +9,30 @@
 perl_version '5.006001';
 all_from 'lib/DBIx/Class.pm';
 
+requires 'DBD::SQLite'              => 1.23;
 requires 'Data::Page'               => 2.00;
 requires 'Scalar::Util'             => 0;
-requires 'SQL::Abstract'            => 1.49;
+requires 'SQL::Abstract'            => 1.51;
 requires 'SQL::Abstract::Limit'     => 0.13;
-requires 'Class::C3'                => 0.20;
-requires 'Class::C3::Componentised' => 0;
+requires 'Class::C3::Componentised' => 1.0005;
 requires 'Storable'                 => 0;
 requires 'Carp::Clan'               => 0;
 requires 'DBI'                      => 1.40;
 requires 'Module::Find'             => 0;
 requires 'Class::Inspector'         => 0;
-requires 'Class::Accessor::Grouped' => 0.08002;
+requires 'Class::Accessor::Grouped' => 0.08003;
 requires 'JSON::Any'                => 1.17;
 requires 'Scope::Guard'             => 0.03;
 requires 'Path::Class'              => 0;
 requires 'List::Util'               => 1.19;
 requires 'Sub::Name'                => 0.04;
+requires 'MRO::Compat'              => 0.09;
 
 # 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'    => 1.14;
+configure_requires 'DBD::SQLite';
 
 test_requires 'Test::Builder'       => 0.33;
 test_requires 'Test::Warn'          => 0.11;
@@ -63,6 +64,12 @@
   # t/60core.t
   'DateTime::Format::MySQL'   => 0,
 
+  # t/72pg.t
+  $ENV{DBICTEST_PG_DSN}
+    ? ('Sys::SigAction'=> 0)
+    : ()
+  ,
+
   # t/93storage_replication.t
   'Moose',                    => 0,
   'MooseX::AttributeHelpers'  => 0.12,
@@ -74,7 +81,7 @@
 if ($Module::Install::AUTHOR) {
 
   foreach my $module (keys %force_requires_if_author) {
-    requires ($module => $force_requires_if_author{$module});
+    build_requires ($module => $force_requires_if_author{$module});
   }
 
   system('pod2text lib/DBIx/Class.pm > README');
@@ -194,7 +201,7 @@
 
 
 if ($Module::Install::AUTHOR) {
-  # Need to do this _after_ WriteAll else it looses track of them
+  # 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) {

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/AbstractSearch.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/AbstractSearch.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/AbstractSearch.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/ColumnGroups.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/ColumnGroups.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/ColumnGroups.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/ColumnsAsHash.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/Copy.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Copy.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Copy.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/Iterator.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Iterator.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Iterator.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/NoObjectIndex.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/Relationship.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Relationship.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Relationship.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/Relationships.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Relationships.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Relationships.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/CDBICompat/Retrieve.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Retrieve.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/CDBICompat/Retrieve.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -50,11 +50,24 @@
 
   $cond =~ s/^\s*WHERE//i;
 
-  if( $cond =~ s/\bLIMIT (\d+)\s*$//i ) {
-      push @rest, { rows => $1 };
+  # Need to parse the SQL clauses after WHERE in reverse
+  # order of appearance.
+
+  my %attrs;
+
+  if( $cond =~ s/\bLIMIT\s+(\d+)\s*$//i ) {
+      $attrs{rows} = $1;
   }
 
-  return $class->search_literal($cond, @rest);
+  if ( $cond =~ s/\bORDER\s+BY\s+(.*)\s*$//i ) {
+      $attrs{order_by} = $1;
+  }
+
+  if( $cond =~ s/\bGROUP\s+BY\s+(.*)\s*$//i ) {
+      $attrs{group_by} = $1;
+  }
+
+  return $class->search_literal($cond, @rest, ( %attrs ? \%attrs : () ) );
 }
 
 sub construct {

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Componentised.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Componentised.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Componentised.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -31,25 +31,4 @@
   $class->next::method($target, @to_inject);
 }
 
-# Returns a true value if the specified class is installed and loaded
-# successfully, throws an exception if the class is found but not loaded
-# successfully, and false if the class is not installed
-sub load_optional_class {
-  my ($class, $f_class) = @_;
-  eval { $class->ensure_class_loaded($f_class) };
-  my $err = $@;   # so we don't lose it
-  if (! $err) {
-    return 1;
-  }
-  else {
-    my $fn = (join ('/', split ('::', $f_class) ) ) . '.pm';
-    if ($err =~ /Can't locate ${fn} in \@INC/ ) {
-      return 0;
-    }
-    else {
-      die $err;
-    }
-  }
-}
-
 1;

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/DB.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/DB.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/DB.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -162,11 +162,12 @@
 sub _maybe_attach_source_to_schema {
   my ($class, $source) = @_;
   if (my $meth = $class->can('schema_instance')) {
-    my $schema = $class->$meth;
-    $schema->register_class($class, $class);
-    my $new_source = $schema->source($class);
-    %$source = %$new_source;
-    $schema->source_registrations->{$class} = $source;
+    if (my $schema = $class->$meth) {
+      $schema->register_class($class, $class);
+      my $new_source = $schema->source($class);
+      %$source = %$new_source;
+      $schema->source_registrations->{$class} = $source;
+    }
   }
 }
 

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/InflateColumn/DateTime.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/InflateColumn/DateTime.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/InflateColumn/DateTime.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -30,7 +30,7 @@
 If you want to set a specific timezone and locale for that field, use:
 
   __PACKAGE__->add_columns(
-    starts_when => { data_type => 'datetime', extra => { timezone => "America/Chicago", locale => "de_DE" } }
+    starts_when => { data_type => 'datetime', timezone => "America/Chicago", locale => "de_DE" }
   );
 
 If you want to inflate no matter what data_type your column is,
@@ -111,13 +111,20 @@
 
   my $timezone;
   if ( defined $info->{extra}{timezone} ) {
+    warn "Putting timezone into extra => { timezone => '...' } has been deprecated, ".
+         "please put it directly into the columns definition.";
     $timezone = $info->{extra}{timezone};
   }
 
   my $locale;
   if ( defined $info->{extra}{locale} ) {
+    warn "Putting locale into extra => { locale => '...' } has been deprecated, ".
+         "please put it directly into the columns definition.";
     $locale = $info->{extra}{locale};
   }
+  
+  $locale   = $info->{locale}   if defined $info->{locale};
+  $timezone = $info->{timezone} if defined $info->{timezone};
 
   my $undef_if_invalid = $info->{datetime_undef_if_invalid};
 
@@ -137,7 +144,13 @@
     #     closure &G, $info => $H
     #     $H => %E
     #
-    my $floating_tz_ok = $info->{extra}{floating_tz_ok};
+    my $floating_tz_ok;
+    if (defined $info->{extra}{floating_tz_ok}) {
+      warn "Putting floating_tz_ok into extra => { floating_tz_ok => 1 } has been deprecated, ".
+           "please put it directly into the columns definition.";
+      $floating_tz_ok = $info->{extra}{floating_tz_ok};
+    }
+    $floating_tz_ok = $info->{floating_tz_ok} if defined $info->{floating_tz_ok};
 
     $self->inflate_column(
       $column =>
@@ -189,7 +202,7 @@
 result you expect). For example:
 
   __PACKAGE__->add_columns(
-    starts_when => { data_type => 'datetime', extra => { timezone => "America/Chicago" } }
+    starts_when => { data_type => 'datetime', timezone => "America/Chicago" }
   );
 
   my $event = $schema->resultset('EventTZ')->create({
@@ -213,7 +226,7 @@
 =item Suppress the check on per-column basis
 
   __PACKAGE__->add_columns(
-    starts_when => { data_type => 'datetime', extra => { timezone => "America/Chicago", floating_tz_ok => 1 } }
+    starts_when => { data_type => 'datetime', timezone => "America/Chicago", floating_tz_ok => 1 }
   );
 
 =item Suppress the check globally
@@ -222,8 +235,11 @@
 
 =back
 
+Putting extra attributes like timezone, locale or floating_tz_ok into extra => {} has been
+B<DEPRECATED> because this gets you into trouble using L<DBIx::Class::Schema::Versioned>.
+Instead put it directly into the columns definition like in the examples above. If you still
+use the old way you'll see a warning - please fix your code then!
 
-
 =head1 SEE ALSO
 
 =over 4

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-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Cookbook.pod	2009-04-24 19:51:16 UTC (rev 5983)
@@ -19,20 +19,9 @@
 
   return $rs->all(); # all records for page 1
 
-The C<page> attribute does not have to be specified in your search:
+You can get a L<Data::Page> object for the resultset (suitable for use
+in e.g. a template) using the C<pager> method:
 
-  my $rs = $schema->resultset('Artist')->search(
-    undef,
-    {
-      rows => 10,
-    }
-  );
-
-  return $rs->page(1); # DBIx::Class::ResultSet containing first 10 records
-
-In either of the above cases, you can get a L<Data::Page> object for the
-resultset (suitable for use in e.g. a template) using the C<pager> method:
-
   return $rs->pager();
 
 =head2 Complex WHERE clauses
@@ -684,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;
 
@@ -1178,6 +1167,18 @@
   while (my @vals = $cursor->next) {
     print $vals[0]."\n";
   }
+
+In case you're going to use this "trick" together with L<DBIx::Class::Schema/deploy> or
+L<DBIx::Class::Schema/create_ddl_dir> a table called "dual" will be created in your
+current schema. This would overlap "sys.dual" and you could not fetch "sysdate" or
+"sequence.nextval" anymore from dual. To avoid this problem, just tell
+L<SQL::Translator> to not create table dual:
+
+    my $sqlt_args = {
+        add_drop_table => 1,
+        parser_args    => { sources => [ grep $_ ne 'Dual', schema->sources ] },
+    };
+    $schema->create_ddl_dir( [qw/Oracle/], undef, './sql', undef, $sqlt_args );
  
 Or use L<DBIx::Class::ResultClass::HashRefInflator>
  
@@ -1737,4 +1738,33 @@
 syntax to load the appropriate classes there is not a direct alternative
 avoiding L<Module::Find|Module::Find>.
 
+=head1 MEMORY USAGE
+
+=head2 Cached statements
+
+L<DBIx::Class> normally caches all statements with L<< prepare_cached()|DBI/prepare_cached >>.
+This is normally a good idea, but if too many statements are cached, the database may use too much
+memory and may eventually run out and fail entirely.  If you suspect this may be the case, you may want
+to examine DBI's L<< CachedKids|DBI/CachedKidsCachedKids_(hash_ref) >> hash:
+
+    # print all currently cached prepared statements
+    print for keys %{$schema->storage->dbh->{CachedKids}};
+    # get a count of currently cached prepared statements
+    my $count = scalar keys %{$schema->storage->dbh->{CachedKids}};
+
+If it's appropriate, you can simply clear these statements, automatically deallocating them in the
+database:
+
+    my $kids = $schema->storage->dbh->{CachedKids};
+    delete @{$kids}{keys %$kids} if scalar keys %$kids > 100;
+
+But what you probably want is to expire unused statements and not those that are used frequently.
+You can accomplish this with L<Tie::Cache> or L<Tie::Cache::LRU>:
+
+    use Tie::Cache;
+    use DB::Main;
+    my $schema = DB::Main->connect($dbi_dsn, $user, $pass, {
+        on_connect_do => sub { tie %{shift->_dbh->{CachedKids}}, 'Tie::Cache', 100 },
+    });
+
 =cut

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Reading.pod
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Reading.pod	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Reading.pod	2009-04-24 19:51:16 UTC (rev 5983)
@@ -34,13 +34,18 @@
 
 =item *
 
-Each method starts with a "head2" statement of it's name.
+Each method starts with a "head2" statement of its name.
 
+Just the plain method name, not an example of how to call it, or a link.
+This is to ensure easy linking to method documentation from other POD.
+
 =item *
 
-The header is followed by a one-item list.
+The header is followed by a two-item list. This contains a description
+of the arguments the method is expected to take, and an indication of
+what the method returns.
 
-The single item provides a list of all possible values for the
+The first item provides a list of all possible values for the
 arguments of the method in order, separated by C<, >, preceeded by the
 text "Arguments: "
 
@@ -70,24 +75,60 @@
 
 =item *
 
+%var - A hashref variable (list of key/value pairs) - rarely used in DBIx::Class.
+
+Reading an argument as a hash variable will consume all subsequent
+method arguments, use with caution.
+
+=item *
+
+ at var - An array variable (list of values).
+
+Reading an argument as a array variable will consume all subsequent
+method arguments, use with caution.
+
+=item *
+
 ? - Optional, should be placed after the argument type and name.
 
+  ## Correct
+  \%myhashref|\@myarrayref?
+
+  ## Wrong
+  \%myhashref?|\@myarrayref
+
+Applies to the entire argument.
+
+Optional arguments can be left out of method calls, unless the caller
+needs to pass in any of the following arguments. In which case the
+caller should pass C<undef> in place of the missing argument.
+
 =item *
 
-| - Alternate argument types.
+| - Alternate argument content types. 
 
+At least one of these must be supplied unless the argument is also
+marked optional.
+
 =back
 
-NOTES:
+The second item starts with the text "Return value:". The remainder of
+the line is either the text "undefined", a text describing the result of
+the method, or a variable with a descriptive name.
 
-If several arguments are optional, it is always possible to pass
-C<undef> as one optional argument in order to skip it and provide a
-value for the following ones. This does not need to be indicated in
-the Arguments line, it is assumed.
+  ## Good examples
+  =item Return value: undefined
+  =item Return value: A schema object
+  =item Return value: $classname
 
-The C<?> for optional arguments always applies to the entire argument
-value, not a particular type or argument.
+  ## Bad examples
+  =item Return value: The names
 
+"undefined" means the method does not deliberately return a value, and
+the caller should not use or rely on anything it does return. (Perl
+functions always return something, usually the result of the last code
+statement, if there is no explicit return statement.)
+
 =item *
 
 The argument list is followed by a single paragraph describing what
@@ -98,6 +139,9 @@
 The description paragraph is followed by another list. Each item in
 the list explains one of the possible argument/type combinations.
 
+This list may be omitted if the author feels that the variable names are
+self-explanatory enough to not require it. Use best judgement.
+
 =item *
 
 The argument list is followed by some examples of how to use the

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Troubleshooting.pod
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Troubleshooting.pod	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Manual/Troubleshooting.pod	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/Relationship/BelongsTo.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Relationship/BelongsTo.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Relationship/BelongsTo.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/ResultClass/HashRefInflator.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultClass/HashRefInflator.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultClass/HashRefInflator.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSet.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSet.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -279,6 +279,11 @@
 sub search_rs {
   my $self = shift;
 
+  # Special-case handling for (undef, undef).
+  if ( @_ == 2 && !defined $_[1] && !defined $_[0] ) {
+    pop(@_); pop(@_);
+  }
+
   my $attrs = {};
   $attrs = pop(@_) if @_ > 1 and ref $_[$#_] eq 'HASH';
   my $our_attrs = { %{$self->{attrs}} };
@@ -388,19 +393,29 @@
 resultset query.
 
 CAVEAT: C<search_literal> is provided for Class::DBI compatibility and should
-only be used in that context. There are known problems using C<search_literal>
-in chained queries; it can result in bind values in the wrong order.  See
-L<DBIx::Class::Manual::Cookbook/Searching> and
+only be used in that context. C<search_literal> is a convenience method. 
+It is equivalent to calling $schema->search(\[]), but if you want to ensure
+columns are bound correctly, use C<search>.
+
+Example of how to use C<search> instead of C<search_literal>
+
+  my @cds = $cd_rs->search_literal('cdid = ? AND (artist = ? OR artist = ?)', (2, 1, 2));
+  my @cds = $cd_rs->search(\[ 'cdid = ? AND (artist = ? OR artist = ?)', [ 'cdid', 2 ], [ 'artist', 1 ], [ 'artist', 2 ] ]);
+
+
+See L<DBIx::Class::Manual::Cookbook/Searching> and 
 L<DBIx::Class::Manual::FAQ/Searching> for searching techniques that do not
 require C<search_literal>.
 
 =cut
 
 sub search_literal {
-  my ($self, $cond, @vals) = @_;
-  my $attrs = (ref $vals[$#vals] eq 'HASH' ? { %{ pop(@vals) } } : {});
-  $attrs->{bind} = [ @{$self->{attrs}{bind}||[]}, @vals ];
-  return $self->search(\$cond, $attrs);
+  my ($self, $sql, @bind) = @_; 
+  my $attr;
+  if ( @bind && ref($bind[-1]) eq 'HASH' ) {
+    $attr = pop @bind;
+  }
+  return $self->search(\[ $sql, map [ __DUMMY__ => $_ ], @bind ], ($attr || () ));
 }
 
 =head2 find
@@ -845,10 +860,24 @@
 
 For more information, see L<DBIx::Class::Manual::Cookbook>.
 
+This method is deprecated and will be removed in 0.09. Use L</search()>
+instead. An example conversion is:
+
+  ->search_like({ foo => 'bar' });
+
+  # Becomes
+
+  ->search({ foo => { like => 'bar' } });
+
 =cut
 
 sub search_like {
   my $class = shift;
+  carp join ("\n",
+    'search_like() is deprecated and will be removed in 0.09.',
+    'Instead use ->search({ x => { -like => "y%" } })',
+    '(note the outer pair of {}s - they are important!)'
+  );
   my $attrs = (@_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {});
   my $query = ref $_[0] eq 'HASH' ? { %{shift()} }: {@_};
   $query->{$_} = { 'like' => $query->{$_} } for keys %$query;
@@ -2070,6 +2099,63 @@
   return $self->create($cond);
 }
 
+=head2 update_or_new
+
+=over 4
+
+=item Arguments: \%col_values, { key => $unique_constraint }?
+
+=item Return Value: $rowobject
+
+=back
+
+  $resultset->update_or_new({ col => $val, ... });
+
+First, searches for an existing row matching one of the unique constraints
+(including the primary key) on the source of this resultset. If a row is
+found, updates it with the other given column values. Otherwise, instantiate
+a new result object and return it. The object will not be saved into your storage
+until you call L<DBIx::Class::Row/insert> on it.
+
+Takes an optional C<key> attribute to search on a specific unique constraint.
+For example:
+
+  # In your application
+  my $cd = $schema->resultset('CD')->update_or_new(
+    {
+      artist => 'Massive Attack',
+      title  => 'Mezzanine',
+      year   => 1998,
+    },
+    { key => 'cd_artist_title' }
+  );
+
+  if ($cd->in_storage) {
+      # the cd was updated
+  }
+  else {
+      # the cd is not yet in the database, let's insert it
+      $cd->insert;
+  }
+
+See also L</find>, L</find_or_create> and L<find_or_new>.
+
+=cut
+
+sub update_or_new {
+    my $self  = shift;
+    my $attrs = ( @_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {} );
+    my $cond  = ref $_[0] eq 'HASH' ? shift : {@_};
+
+    my $row = $self->find( $cond, $attrs );
+    if ( defined $row ) {
+        $row->update($cond);
+        return $row;
+    }
+
+    return $self->new_result($cond);
+}
+
 =head2 get_cache
 
 =over 4

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSetColumn.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSetColumn.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSetColumn.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/ResultSource.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSource.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSource.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -125,9 +125,13 @@
 =item default_value
 
 Set this to the default value which will be inserted into a column
-by the database. Can contain either a value or a function. This is
-currently only used by L<DBIx::Class::Schema/deploy>.
+by the database. Can contain either a value or a function (use a
+reference to a scalar e.g. C<\'now()'> if you want a function). This
+is currently only used by L<DBIx::Class::Schema/deploy>.
 
+See the note on L<DBIx::Class::Row/new> for more information about possible
+issues related to db-side default values.
+
 =item sequence
 
 Set this on a primary key column to the name of the sequence used to
@@ -1085,12 +1089,16 @@
   $seen ||= {};
   $force_left ||= { force => 0 };
   if (ref $join eq 'ARRAY') {
-    return map { $self->resolve_join($_, $alias, $seen) } @$join;
+    return
+      map {
+        local $force_left->{force} = $force_left->{force};
+        $self->resolve_join($_, $alias, $seen, $force_left);
+      } @$join;
   } elsif (ref $join eq 'HASH') {
     return
       map {
         my $as = ($seen->{$_} ? $_.'_'.($seen->{$_}+1) : $_);
-        local $force_left->{force};
+        local $force_left->{force} = $force_left->{force};
         (
           $self->resolve_join($_, $alias, $seen, $force_left),
           $self->related_source($_)->resolve_join(
@@ -1196,7 +1204,11 @@
         #warn "$self $k $for $v";
         unless ($for->has_column_loaded($v)) {
           if ($for->in_storage) {
-            $self->throw_exception("Column ${v} not loaded on ${for} trying to resolve relationship");
+            $self->throw_exception(
+              "Column ${v} not loaded or not passed to new() prior to insert()"
+                ." on ${for} trying to resolve relationship (maybe you forgot "
+                  ."to call ->reload_from_storage to get defaults from the db)"
+            );
           }
           return $UNRESOLVABLE_CONDITION;
         }

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSourceHandle.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSourceHandle.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/ResultSourceHandle.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Row.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Row.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -77,6 +77,23 @@
 
 For a more involved explanation, see L<DBIx::Class::ResultSet/create>.
 
+Please note that if a value is not passed to new, no value will be sent
+in the SQL INSERT call, and the column will therefore assume whatever
+default value was specified in your database. While DBIC will retrieve the
+value of autoincrement columns, it will never make an explicit database
+trip to retrieve default values assigned by the RDBMS. You can explicitly
+request that all values be fetched back from the database by calling
+L</discard_changes>, or you can supply an explicit C<undef> to columns
+with NULL as the default, and save yourself a SELECT.
+
+ CAVEAT:
+
+ The behavior described above will backfire if you use a foreign key column
+ with a database-defined default. If you call the relationship accessor on
+ an object that doesn't have a set value for the FK column, DBIC will throw
+ an exception, as it has no way of knowing the PK of the related object (if
+ there is one).
+
 =cut
 
 ## It needs to store the new objects somewhere, and call insert on that list later when insert is called on this object. We may need an accessor for these so the user can retrieve them, if just doing ->new().

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Schema/Versioned.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Schema/Versioned.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -613,7 +613,7 @@
 
 =head1 AUTHORS
 
-Jess Robinson <castaway at desert-island.demon.co.uk>
+Jess Robinson <castaway at desert-island.me.uk>
 Luke Saunders <luke at shadowcatsystems.co.uk>
 
 =head1 LICENSE

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-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Schema.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -617,7 +617,7 @@
   $self->storage->txn_do(@_);
 }
 
-=head2 txn_scope_guard (EXPERIMENTAL)
+=head2 txn_scope_guard
 
 Runs C<txn_scope_guard> on the schema's storage. See 
 L<DBIx::Class::Storage/txn_scope_guard>.
@@ -1267,24 +1267,32 @@
 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});
 
-  if ($source->result_class) {
-    my %map = %{$self->class_mappings};
-    if (exists $map{$source->result_class}) {
-      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/count_distinct/lib/DBIx/Class/Storage/DBI/SQLite.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/DBI/SQLite.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/DBI/SQLite.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -45,21 +45,6 @@
   return $backupfile;
 }
 
-sub disconnect {
-
-  # As described in this node http://www.perlmonks.org/?node_id=666210
-  # there seems to be no sane way to ->disconnect a SQLite database with
-  # cached statement handles. As per mst we just zap the cache and 
-  # proceed as normal.
-
-  my $self = shift;
-  if ($self->connected) {
-    $self->_dbh->{CachedKids} = {};
-    $self->next::method (@_);
-  }
-}
-
-
 1;
 
 =head1 NAME

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/DBI.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/DBI.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -1287,20 +1287,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
@@ -1385,14 +1387,6 @@
   my ($self, $ident, $select, $condition, $attrs) = @_;
   my $order = $attrs->{order_by};
 
-  if (ref $condition eq 'SCALAR') {
-    my $unwrap = ${$condition};
-    if ($unwrap =~ s/ORDER BY (.*)$//i) {
-      $order = $1;
-      $condition = \$unwrap;
-    }
-  }
-
   my $for = delete $attrs->{for};
   my $sql_maker = $self->sql_maker;
   $sql_maker->{for} = $for;

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/TxnScopeGuard.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/TxnScopeGuard.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage/TxnScopeGuard.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -1,5 +1,4 @@
-package # Hide from pause for now - till we get it working
-  DBIx::Class::Storage::TxnScopeGuard;
+package DBIx::Class::Storage::TxnScopeGuard;
 
 use strict;
 use warnings;
@@ -47,7 +46,7 @@
 
 =head1 NAME
 
-DBIx::Class::Storage::TxnScopeGuard - Experimental
+DBIx::Class::Storage::TxnScopeGuard - Scope-based transaction handling
 
 =head1 SYNOPSIS
 
@@ -70,14 +69,15 @@
 
 =head2 new
 
-Creating an instance of this class will start a new transaction. Expects a
+Creating an instance of this class will start a new transaction (by
+implicitly calling L<DBIx::Class::Storage/txn_begin>. Expects a
 L<DBIx::Class::Storage> object as its only argument.
 
 =head2 commit
 
 Commit the transaction, and stop guarding the scope. If this method is not
-called (i.e. an exception is thrown) and this object goes out of scope then
-the transaction is rolled back.
+called and this object goes out of scope (i.e. an exception is thrown) then
+the transaction is rolled back, via L<DBIx::Class::Storage/txn_rollback>
 
 =cut
 

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Storage.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -299,21 +299,25 @@
 
 =for comment
 
-=head2 txn_scope_guard (EXPERIMENTAL)
+=head2 txn_scope_guard
 
-An alternative way of using transactions to C<txn_do>:
+An alternative way of transaction handling based on
+L<DBIx::Class::Storage::TxnScopeGuard>:
 
- my $txn = $storage->txn_scope_guard;
+ my $txn_guard = $storage->txn_scope_guard;
 
  $row->col1("val1");
  $row->update;
 
- $txn->commit;
+ $txn_guard->commit;
 
-If a exception occurs, the transaction will be rolled back. This is still very
-experiemental, and we are not 100% sure it is working right when nested. The
-onus is on you as the user to make sure you dont forget to call
-$C<$txn->commit>.
+If an exception occurs, or the guard object otherwise leaves the scope
+before C<< $txn_guard->commit >> is called, the transaction will be rolled
+back by an explicit L</txn_rollback> call. In essence this is akin to
+using a L</txn_begin>/L</txn_commit> pair, without having to worry
+about calling L</txn_rollback> at the right places. Note that since there
+is no defined code closure, there will be no retries and other magic upon
+database disconnection. If you need such functionality see L</txn_do>.
 
 =cut
 

Modified: DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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.08099_07';
+$VERSION = '0.08100';
 
 $VERSION = eval $VERSION; # numify for warning-free dev releases
 
@@ -221,8 +221,6 @@
 
 caelum: Rafael Kitover <rkitover at cpan.org>
 
-captainL: Luke Saunders <luke.saunders at gmail.com>
-
 castaway: Jess Robinson
 
 claco: Christopher H. Laco
@@ -245,6 +243,8 @@
 
 groditi: Guillermo Roditi <groditi at cpan.org>
 
+ilmari: Dagfinn Ilmari MannsE<aring>ker <ilmari at ilmari.org>
+
 jesper: Jesper Krogh
 
 jgoulah: John Goulah <jgoulah at cpan.org>
@@ -259,6 +259,8 @@
 
 konobi: Scott McWhirter
 
+lukes: Luke Saunders <luke.saunders at gmail.com>
+
 marcus: Marcus Ramberg <mramberg at cpan.org>
 
 mattlaw: Matt Lawrence
@@ -271,6 +273,8 @@
 
 ningu: David Kamholz <dkamholz at cpan.org>
 
+norbi: Norbert Buchmuller <norbi at nix.hu>
+
 Numa: Dan Sully <daniel at cpan.org>
 
 oyse: Øystein Torget <oystein.torget at dnv.com>
@@ -281,6 +285,8 @@
 
 perigrin: Chris Prather <chris at prather.org>
 
+peter: Peter Collingbourne <peter at pcc.me.uk>
+
 phaylon: Robert Sedlacek <phaylon at dunkelheit.at>
 
 plu: Johannes Plunien <plu at cpan.org>
@@ -303,6 +309,8 @@
 
 semifor: Marc Mims <marc at questright.com>
 
+solomon: Jared Johnson <jaredj at nmgi.com>
+
 sszabo: Stephan Szabo <sszabo at bigpanda.com>
 
 teejay : Aaron Trevena <teejay at cpan.org>
@@ -323,8 +331,6 @@
 
 zamolxes: Bogdan Lucaciu <bogdan at wiz.ro>
 
-norbi: Norbert Buchmuller <norbi at nix.hu>
-
 =head1 LICENSE
 
 You may distribute this code under the same terms as Perl itself.

Modified: DBIx-Class/0.08/branches/count_distinct/t/04dont_break_c3.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/04dont_break_c3.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/04dont_break_c3.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -4,6 +4,7 @@
 
 use strict;
 use Test::More tests => 2;
+use MRO::Compat;
 
 {
 package AAA;
@@ -26,8 +27,8 @@
 __PACKAGE__->inject_base( __PACKAGE__, 'DBIx::Class::Core' );
 }
 
-eval { Class::C3::calculateMRO('BBB'); };
+eval { mro::get_linear_isa('BBB'); };
 ok (! $@, "Correctly skipped injecting a direct parent of class BBB");
 
-eval { Class::C3::calculateMRO('CCC'); };
+eval { mro::get_linear_isa('CCC'); };
 ok (! $@, "Correctly skipped injecting an indirect parent of class BBB");

Modified: DBIx-Class/0.08/branches/count_distinct/t/100extra_source.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/100extra_source.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/100extra_source.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -12,7 +12,7 @@
     use base qw/DBIx::Class::ResultSource::Table/;
 }
 
-plan tests => 3;
+plan tests => 4;
 
 my $schema = DBICTest->init_schema();
 my $artist_source = $schema->source('Artist');
@@ -36,6 +36,12 @@
 }
 
 {
+  my $source = $schema->source('DBICTest::Artist');
+  $schema->register_source($source->source_name, $source);
+  is($warn, '', "re-registering an existing source under the same name causes no errors");
+}
+
+{
   my $new_source_name = 'Artist->preview(artist_preview)';
   $schema->register_source( $new_source_name => $new_source );
 

Modified: DBIx-Class/0.08/branches/count_distinct/t/19quotes.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/19quotes.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/19quotes.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -19,7 +19,7 @@
 use_ok('DBIC::DebugObj');
 my $schema = DBICTest->init_schema();
 
-diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/));
+#diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/));
 
 $schema->storage->sql_maker->quote_char('`');
 $schema->storage->sql_maker->name_sep('.');

Modified: DBIx-Class/0.08/branches/count_distinct/t/19quotes_newstyle.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/19quotes_newstyle.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/19quotes_newstyle.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -19,7 +19,7 @@
 
 my $schema = DBICTest->init_schema();
 
-diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/));
+#diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/));
 
 my $dsn = $schema->storage->_dbi_connect_info->[0];
 $schema->connection(

Modified: DBIx-Class/0.08/branches/count_distinct/t/33storage_reconnect.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/33storage_reconnect.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/33storage_reconnect.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -7,18 +7,8 @@
 use lib qw(t/lib);
 use DBICTest;
 
-# equivalent of $Module::Install::AUTHOR
-my $author =
-  not  -d './inc'
-    or
-  -e ($^O eq 'VMS' ? './inc/_author' : './inc/.author')
-;
+plan tests => 6;
 
-plan $author
-  ? (tests => 6)
-  : (skip_all => 'Test temporarily disabled due to a widespread buggy SQLite version')
-;
-
 my $db_orig = "$FindBin::Bin/var/DBIxClass.db";
 my $db_tmp  = "$db_orig.tmp";
 
@@ -31,12 +21,11 @@
 
 # Disconnect the dbh, and be sneaky about it
 # Also test if DBD::SQLite finaly knows how to ->disconnect properly
-TODO: {
-    local $TODO = 'SQLite is evil/braindead. Once this test starts passing, remove the related atrocity from DBIx::Class::Storage::DBI::SQLite';
-    my $w;
-    local $SIG{__WARN__} = sub { $w = shift };
-    $schema->storage->_dbh->disconnect;
-    ok ($w !~ /active statement handles/, 'SQLite can disconnect properly \o/');
+{
+  my $w;
+  local $SIG{__WARN__} = sub { $w = shift };
+  $schema->storage->_dbh->disconnect;
+  ok ($w !~ /active statement handles/, 'SQLite can disconnect properly');
 }
 
 # Try the operation again - What should happen here is:

Modified: DBIx-Class/0.08/branches/count_distinct/t/39load_namespaces_rt41083.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/39load_namespaces_rt41083.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/39load_namespaces_rt41083.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -2,50 +2,65 @@
 
 use strict;
 use warnings;
-use Test::More;
 
 use lib 't/lib';
+use Test::More tests => 8;
 
-plan tests => 6;
-
 sub _chk_warning {
-	defined $_[0]? 
-		$_[0] !~ qr/We found ResultSet class '([^']+)' for '([^']+)', but it seems that you had already set '([^']+)' to use '([^']+)' instead/ :
-		1
+  defined $_[0]?
+    $_[0] !~ qr/We found ResultSet class '([^']+)' for '([^']+)', but it seems that you had already set '([^']+)' to use '([^']+)' instead/ :
+    1
 }
 
 sub _chk_extra_sources_warning {
-	my $p = qr/already has a source, use register_extra_source for additional sources/;
-	defined $_[0]? $_[0] !~ /$p/ : 1;
+  my $p = qr/already has a source, use register_extra_source for additional sources/;
+  defined $_[0]? $_[0] !~ /$p/ : 1;
 }
 
-my $warnings;
-eval {
+sub _verify_sources {
+  my @monikers = @_;
+  is_deeply (
+    [ sort DBICNSTest::RtBug41083->sources ],
+    \@monikers,
+    'List of resultsource registrations',
+  );
+}
+
+{
+  my $warnings;
+  eval {
     local $SIG{__WARN__} = sub { $warnings .= shift };
     package DBICNSTest::RtBug41083;
     use base 'DBIx::Class::Schema';
     __PACKAGE__->load_namespaces(
-	result_namespace => 'Schema_A',
-	resultset_namespace => 'ResultSet_A',
-	default_resultset_class => 'ResultSet'
+      result_namespace => 'Schema_A',
+      resultset_namespace => 'ResultSet_A',
+      default_resultset_class => 'ResultSet'
     );
-};
-ok(!$@) or diag $@;
-ok(_chk_warning($warnings), 'expected no resultset complaint');
-ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint');
-undef $warnings;
+  };
 
-eval {
+  ok(!$@) or diag $@;
+  ok(_chk_warning($warnings), 'expected no resultset complaint');
+  ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint') or diag($warnings);
+
+  _verify_sources (qw/A A::Sub/);
+}
+
+{
+  my $warnings;
+  eval {
     local $SIG{__WARN__} = sub { $warnings .= shift };
     package DBICNSTest::RtBug41083;
     use base 'DBIx::Class::Schema';
     __PACKAGE__->load_namespaces(
-	result_namespace => 'Schema',
-	resultset_namespace => 'ResultSet',
-	default_resultset_class => 'ResultSet'
+      result_namespace => 'Schema',
+      resultset_namespace => 'ResultSet',
+      default_resultset_class => 'ResultSet'
     );
-};
-ok(!$@) or diag $@;
-ok(_chk_warning($warnings), 'expected no resultset complaint') or diag $warnings;
-ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint');
-undef $warnings;
+  };
+  ok(!$@) or diag $@;
+  ok(_chk_warning($warnings), 'expected no resultset complaint') or diag $warnings;
+  ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint') or diag($warnings);
+
+  _verify_sources (qw/A A::Sub Foo Foo::Sub/);
+}

Modified: DBIx-Class/0.08/branches/count_distinct/t/63register_class.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/63register_class.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/63register_class.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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();
 

Modified: DBIx-Class/0.08/branches/count_distinct/t/66relationship.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/66relationship.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/66relationship.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -8,7 +8,7 @@
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 70;
+plan tests => 74;
 
 # has_a test
 my $cd = $schema->resultset("CD")->find(4);
@@ -35,10 +35,15 @@
 if ($INC{'DBICTest/HelperRels.pm'}) {
   $artist->add_to_cds({ title => 'Big Flop', year => 2005 });
 } else {
-  $artist->create_related( 'cds', {
+  my $big_flop = $artist->create_related( 'cds', {
       title => 'Big Flop',
       year => 2005,
   } );
+
+ SKIP:{
+    skip "Can't fix right now", 1 if $DBIx::Class::VERSION < 0.09;
+    lives_ok { $big_flop->genre} "Don't throw exception when col is not loaded after insert";
+  };
 }
 
 my $big_flop_cd = ($artist->search_related('cds'))[3];
@@ -284,3 +289,13 @@
 my $rs_overridden = $schema->source('ForceForeign');
 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' } });
+is($cds->count, 1, "subjoins under left joins force_left (string)");
+
+$cds = $schema->resultset("CD")->search({ cdid => 1 }, { join => { genre => [ 'demographic' ] } });
+is($cds->count, 1, "subjoins under left joins force_left (arrayref)");
+
+$cds = $schema->resultset("CD")->search({ cdid => 1 }, { join => { genre => { demographic => {} } } });
+is($cds->count, 1, "subjoins under left joins force_left (hashref)");

Modified: DBIx-Class/0.08/branches/count_distinct/t/71mysql.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/71mysql.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/71mysql.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -108,7 +108,7 @@
     => 'Created an artist resultset of undef';
     
     TODO: {
-    	$TODO = "need to fix the row count =1 when select * from table where pk IS NULL problem";
+    	local $TODO = "need to fix the row count =1 when select * from table where pk IS NULL problem";
 	    is $artist2_rs->count, 0
 	    => 'got no rows';    	
     }

Modified: DBIx-Class/0.08/branches/count_distinct/t/72pg.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/72pg.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/72pg.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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');
 
@@ -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/count_distinct/t/76select.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/76select.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/76select.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -8,7 +8,7 @@
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 12;
+plan tests => 13;
 
 my $rs = $schema->resultset('CD')->search({},
     {
@@ -28,6 +28,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' ],

Modified: DBIx-Class/0.08/branches/count_distinct/t/80unique.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/80unique.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/80unique.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -7,7 +7,7 @@
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 45;
+plan tests => 49;
 
 # Check the defined unique constraints
 is_deeply(
@@ -183,3 +183,30 @@
   ok($cd->in_storage, 'find correctly grepped the key across a relationship');
   is($cd->cdid, 1, 'cdid is correct');
 }
+
+# Test update_or_new
+{
+    my $cd1 = $schema->resultset('CD')->update_or_new(
+      {
+        artist => $artistid,
+        title  => "SuperHits $$",
+        year   => 2007,
+      },
+      { key => 'cd_artist_title' }
+    );
+
+    ok(!$cd1->in_storage, 'CD is not in storage yet after update_or_new');
+    $cd1->insert;
+    ok($cd1->in_storage, 'CD got added to strage after update_or_new && insert');
+
+    my $cd2 = $schema->resultset('CD')->update_or_new(
+      {
+        artist => $artistid,
+        title  => "SuperHits $$",
+        year   => 2008,
+      },
+      { key => 'cd_artist_title' }
+    );
+    ok($cd2->in_storage, 'Updating year using update_or_new was successful');
+    is($cd2->id, $cd1->id, 'Got the same CD using update_or_new');
+}
\ No newline at end of file

Modified: DBIx-Class/0.08/branches/count_distinct/t/89dbicadmin.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/89dbicadmin.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/89dbicadmin.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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/count_distinct/t/89inflate_datetime.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/89inflate_datetime.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/89inflate_datetime.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -5,12 +5,17 @@
 use lib qw(t/lib);
 use DBICTest;
 
+{
+  local $SIG{__WARN__} = sub { warn @_ if $_[0] !~ /extra \=\> .+? has been deprecated/ };
+  DBICTest::Schema->load_classes('EventTZDeprecated');
+}
+
 my $schema = DBICTest->init_schema();
 
 eval { require DateTime::Format::MySQL };
 plan skip_all => "Need DateTime::Format::MySQL for inflation tests" if $@;
 
-plan tests => 32;
+plan tests => 50;
 
 # inflation test
 my $event = $schema->resultset("Event")->find(1);
@@ -52,75 +57,78 @@
 
 
 # Test "timezone" parameter
-my $event_tz = $schema->resultset('EventTZ')->create({
-    starts_at => DateTime->new(year=>2007, month=>12, day=>31, time_zone => "America/Chicago" ),
-    created_on => DateTime->new(year=>2006, month=>1, day=>31,
-        hour => 13, minute => 34, second => 56, time_zone => "America/New_York" ),
-});
 
-is ($event_tz->starts_at->day_name, "Montag", 'Locale de_DE loaded: day_name');
-is ($event_tz->starts_at->month_name, "Dezember", 'Locale de_DE loaded: month_name');
-is ($event_tz->created_on->day_name, "Tuesday", 'Default locale loaded: day_name');
-is ($event_tz->created_on->month_name, "January", 'Default locale loaded: month_name');
+foreach my $tbl (qw/EventTZ EventTZDeprecated/) {
+  my $event_tz = $schema->resultset($tbl)->create({
+      starts_at => DateTime->new(year=>2007, month=>12, day=>31, time_zone => "America/Chicago" ),
+      created_on => DateTime->new(year=>2006, month=>1, day=>31,
+          hour => 13, minute => 34, second => 56, time_zone => "America/New_York" ),
+  });
 
-my $starts_at = $event_tz->starts_at;
-is("$starts_at", '2007-12-31T00:00:00', 'Correct date/time using timezone');
+  is ($event_tz->starts_at->day_name, "Montag", 'Locale de_DE loaded: day_name');
+  is ($event_tz->starts_at->month_name, "Dezember", 'Locale de_DE loaded: month_name');
+  is ($event_tz->created_on->day_name, "Tuesday", 'Default locale loaded: day_name');
+  is ($event_tz->created_on->month_name, "January", 'Default locale loaded: month_name');
 
-my $created_on = $event_tz->created_on;
-is("$created_on", '2006-01-31T12:34:56', 'Correct timestamp using timezone');
-is($event_tz->created_on->time_zone->name, "America/Chicago", "Correct timezone");
+  my $starts_at = $event_tz->starts_at;
+  is("$starts_at", '2007-12-31T00:00:00', 'Correct date/time using timezone');
 
-my $loaded_event = $schema->resultset('EventTZ')->find( $event_tz->id );
+  my $created_on = $event_tz->created_on;
+  is("$created_on", '2006-01-31T12:34:56', 'Correct timestamp using timezone');
+  is($event_tz->created_on->time_zone->name, "America/Chicago", "Correct timezone");
 
-isa_ok($loaded_event->starts_at, 'DateTime', 'DateTime returned');
-$starts_at = $loaded_event->starts_at;
-is("$starts_at", '2007-12-31T00:00:00', 'Loaded correct date/time using timezone');
-is($starts_at->time_zone->name, 'America/Chicago', 'Correct timezone');
+  my $loaded_event = $schema->resultset($tbl)->find( $event_tz->id );
 
-isa_ok($loaded_event->created_on, 'DateTime', 'DateTime returned');
-$created_on = $loaded_event->created_on;
-is("$created_on", '2006-01-31T12:34:56', 'Loaded correct timestamp using timezone');
-is($created_on->time_zone->name, 'America/Chicago', 'Correct timezone');
+  isa_ok($loaded_event->starts_at, 'DateTime', 'DateTime returned');
+  $starts_at = $loaded_event->starts_at;
+  is("$starts_at", '2007-12-31T00:00:00', 'Loaded correct date/time using timezone');
+  is($starts_at->time_zone->name, 'America/Chicago', 'Correct timezone');
 
-# Test floating timezone warning
-# We expect one warning
-SKIP: {
-    skip "ENV{DBIC_FLOATING_TZ_OK} was set, skipping", 1 if $ENV{DBIC_FLOATING_TZ_OK};
-    local $SIG{__WARN__} = sub {
-        like(
-            shift,
-            qr/You're using a floating timezone, please see the documentation of DBIx::Class::InflateColumn::DateTime for an explanation/,
-            'Floating timezone warning'
-        );
-    };
-    my $event_tz_floating = $schema->resultset('EventTZ')->create({
-        starts_at => DateTime->new(year=>2007, month=>12, day=>31, ),
-        created_on => DateTime->new(year=>2006, month=>1, day=>31,
-            hour => 13, minute => 34, second => 56, ),
-    });
-    delete $SIG{__WARN__};
-};
+  isa_ok($loaded_event->created_on, 'DateTime', 'DateTime returned');
+  $created_on = $loaded_event->created_on;
+  is("$created_on", '2006-01-31T12:34:56', 'Loaded correct timestamp using timezone');
+  is($created_on->time_zone->name, 'America/Chicago', 'Correct timezone');
 
-# This should fail to set
-my $prev_str = "$created_on";
-$loaded_event->update({ created_on => '0000-00-00' });
-is("$created_on", $prev_str, "Don't update invalid dates");
+  # Test floating timezone warning
+  # We expect one warning
+  SKIP: {
+      skip "ENV{DBIC_FLOATING_TZ_OK} was set, skipping", 1 if $ENV{DBIC_FLOATING_TZ_OK};
+      local $SIG{__WARN__} = sub {
+          like(
+              shift,
+              qr/You're using a floating timezone, please see the documentation of DBIx::Class::InflateColumn::DateTime for an explanation/,
+              'Floating timezone warning'
+          );
+      };
+      my $event_tz_floating = $schema->resultset($tbl)->create({
+          starts_at => DateTime->new(year=>2007, month=>12, day=>31, ),
+          created_on => DateTime->new(year=>2006, month=>1, day=>31,
+              hour => 13, minute => 34, second => 56, ),
+      });
+      delete $SIG{__WARN__};
+  };
 
-my $invalid = $schema->resultset('Event')->create({
-    starts_at  => '0000-00-00',
-    created_on => $created_on
-});
+  # This should fail to set
+  my $prev_str = "$created_on";
+  $loaded_event->update({ created_on => '0000-00-00' });
+  is("$created_on", $prev_str, "Don't update invalid dates");
 
-is( $invalid->get_column('starts_at'), '0000-00-00', "Invalid date stored" );
-is( $invalid->starts_at, undef, "Inflate to undef" );
+  my $invalid = $schema->resultset('Event')->create({
+      starts_at  => '0000-00-00',
+      created_on => $created_on
+  });
 
-$invalid->created_on('0000-00-00');
-$invalid->update;
+  is( $invalid->get_column('starts_at'), '0000-00-00', "Invalid date stored" );
+  is( $invalid->starts_at, undef, "Inflate to undef" );
 
-{
-    local $@;
-    eval { $invalid->created_on };
-    like( $@, qr/invalid date format/i, "Invalid date format exception");
+  $invalid->created_on('0000-00-00');
+  $invalid->update;
+
+  {
+      local $@;
+      eval { $invalid->created_on };
+      like( $@, qr/invalid date format/i, "Invalid date format exception");
+  }
 }
 
 ## varchar field using inflate_date => 1

Modified: DBIx-Class/0.08/branches/count_distinct/t/91debug.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/91debug.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/91debug.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -57,7 +57,7 @@
     my @cds = $schema->resultset('CD')->search( { artist => 1, cdid => { -between => [ 1, 3 ] }, } );
     is_same_sql_bind(
         $sql, [],
-        "SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( artist = ? AND cdid BETWEEN ? AND ? ): '1', '1', '3'", [],
+        "SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( artist = ? AND (cdid BETWEEN ? AND ?) ): '1', '1', '3'", [],
         'got correct SQL with all bind parameters (debugcb)'
     );
 
@@ -66,7 +66,7 @@
     @cds = $schema->resultset('CD')->search( { artist => 1, cdid => { -between => [ 1, 3 ] }, } );
     is_same_sql_bind(
         $sql, \@bind,
-        "SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( artist = ? AND cdid BETWEEN ? AND ? )", ["'1'", "'1'", "'3'"],
+        "SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( artist = ? AND (cdid BETWEEN ? AND ?) )", ["'1'", "'1'", "'3'"],
         'got correct SQL with all bind parameters (debugobj)'
     );
 }

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-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/93single_accessor_object.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -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' });
+	my $genre = $schema->resultset('Genre')->create({ genreid => 88, name => 'disco', demographicid => 1 });
 	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-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/96multi_create_torture.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -27,6 +27,9 @@
     year => '2012',
     genre => {
       name => '"Greatest" collections',
+      demographic => {
+        name => '"Greatest" collections demographic',
+      },
     },
     tags => [
       { tag => 'A' },
@@ -47,6 +50,9 @@
                       year => 2012,
                       genre => {
                         name => '"Greatest" collections',
+                        demographic => {
+                          name => '"Greatest" collections demographic',
+                        },
                       },
                       tags => [
                         { tag => 'A' },
@@ -68,6 +74,9 @@
                                     year => 2012,
                                     genre => {
                                       name => '"Greatest" collections',
+                                      demographic => {
+                                        name => '"Greatest" collections demographic',
+                                      },
                                     },
                                     tags => [
                                       { tag => 'A' },
@@ -79,6 +88,9 @@
                                     year => 2012,
                                     genre => {
                                       name => '"Greatest" collections2',
+                                      demographic => {
+                                        name => '"Greatest" collections demographic',
+                                      },
                                     },
                                     tags => [
                                       { tag => 'A' },
@@ -91,6 +103,9 @@
                               year => 2013,
                               genre => {
                                 name => '"Greatest" collections2',
+                                demographic => {
+                                  name => '"Greatest" collections demographic',
+                                },
                               },
                             }},
                           ],
@@ -103,6 +118,9 @@
                 year => 2012,
                 genre => {
                   name => '"Greatest" collections',
+                  demographic => {
+                    name => '"Greatest" collections demographic',
+                  },
                 },
                 tags => [
                   { tag => 'A' },

Modified: DBIx-Class/0.08/branches/count_distinct/t/cdbi/02-Film.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/02-Film.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/02-Film.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -151,7 +151,7 @@
 
 # Multi-column search
 {
-	my @films = $blrunner->search_like(title => "Bladerunner%", rating => '15');
+	my @films = $blrunner->search (title => { -like => "Bladerunner%"}, rating => '15');
 	is @films, 1, "Only one Bladerunner is a 15";
 }
 
@@ -208,7 +208,7 @@
 is($films[0]->id, $gone->id, ' ... the correct one');
 
 # Find all films which were directed by Bob
- at films = Film->search_like('Director', 'Bob %');
+ at films = Film->search ( { 'Director' => { -like => 'Bob %' } });
 is(scalar @films, 3, ' search_like returns 3 films');
 ok(
 	eq_array(

Modified: DBIx-Class/0.08/branches/count_distinct/t/cdbi/15-accessor.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/15-accessor.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/15-accessor.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -25,6 +25,11 @@
     sub Class::DBI::sheep { ok 0; }
 }
 
+# Install the deprecation warning intercept here for the rest of the 08 dev cycle
+local $SIG{__WARN__} = sub {
+  warn @_ unless (DBIx::Class->VERSION < 0.09 and $_[0] =~ /Query returned more than one row/);
+};
+
 sub Film::mutator_name {
     my ($class, $col) = @_;
     return "set_sheep" if lc $col eq "numexplodingsheep";
@@ -160,9 +165,6 @@
     like $@, qr/film/, "no hasa film";
 
     eval {
-        local $SIG{__WARN__} = sub {
-            warn @_ unless $_[0] =~ /Query returned more than one row/;
-        };
         ok my $f = $ac->movie, "hasa movie";
         isa_ok $f, "Film";
         is $f->id, $bt->id, " - Bad Taste";
@@ -264,5 +266,5 @@
     my $abigail = eval { Film->create({ title => "Abigail's Party" }) };
     like $@, qr/read only/, "Or create new films";
 
-    $sandl->discard_changes;
+    $_->discard_changes for ($naked, $sandl);
 }

Modified: DBIx-Class/0.08/branches/count_distinct/t/cdbi/22-deflate_order.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/22-deflate_order.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/22-deflate_order.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -12,6 +12,7 @@
 eval { require Time::Piece::MySQL };
 plan skip_all => "Need Time::Piece::MySQL for this test" if $@;
 
+use lib 't/cdbi/testlib';
 eval { require 't/cdbi/testlib/Log.pm' };
 plan skip_all => "Need MySQL for this test" if $@;
 

Modified: DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/MyBase.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/MyBase.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/cdbi/testlib/MyBase.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -8,9 +8,7 @@
 
 use vars qw/$dbh/;
 
-# temporary, might get switched to the new test framework someday
-my @connect = ("dbi:mysql:test", "", "", { PrintError => 0});
-
+my @connect = (@ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/}, { PrintError => 0});
 $dbh = DBI->connect(@connect) or die DBI->errstr;
 my @table;
 

Added: 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	                        (rev 0)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Demographic.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -0,0 +1,21 @@
+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/EventTZ.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZ.pm	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZ.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -10,8 +10,8 @@
 
 __PACKAGE__->add_columns(
   id => { data_type => 'integer', is_auto_increment => 1 },
-  starts_at => { data_type => 'datetime', extra => { timezone => "America/Chicago", locale => 'de_DE' } },
-  created_on => { data_type => 'timestamp', extra => { timezone => "America/Chicago", floating_tz_ok => 1 } },
+  starts_at => { data_type => 'datetime', timezone => "America/Chicago", locale => 'de_DE' },
+  created_on => { data_type => 'timestamp', timezone => "America/Chicago", floating_tz_ok => 1 },
 );
 
 __PACKAGE__->set_primary_key('id');

Copied: DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZDeprecated.pm (from rev 5756, DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZ.pm)
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZDeprecated.pm	                        (rev 0)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/EventTZDeprecated.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -0,0 +1,19 @@
+package DBICTest::Schema::EventTZDeprecated;
+
+use strict;
+use warnings;
+use base qw/DBIx::Class::Core/;
+
+__PACKAGE__->load_components(qw/InflateColumn::DateTime/);
+
+__PACKAGE__->table('event');
+
+__PACKAGE__->add_columns(
+  id => { data_type => 'integer', is_auto_increment => 1 },
+  starts_at => { data_type => 'datetime', extra => { timezone => "America/Chicago", locale => 'de_DE' } },
+  created_on => { data_type => 'timestamp', extra => { timezone => "America/Chicago", floating_tz_ok => 1 } },
+);
+
+__PACKAGE__->set_primary_key('id');
+
+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-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema/Genre.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -14,10 +14,15 @@
       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-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/DBICTest/Schema.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -11,6 +11,7 @@
   BindType
   Employee
   CD
+  Demographic
   FileColumn
   Genre
   Link

Copied: DBIx-Class/0.08/branches/count_distinct/t/lib/Test (from rev 5756, DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Test)

Modified: DBIx-Class/0.08/branches/count_distinct/t/lib/Test/SQLite.pm
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/lib/DBIx/Class/Test/SQLite.pm	2009-03-14 13:55:55 UTC (rev 5756)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/Test/SQLite.pm	2009-04-24 19:51:16 UTC (rev 5983)
@@ -1,4 +1,5 @@
-package DBIx::Class::Test::SQLite;
+package # hide from PAUSE
+    DBIx::Class::Test::SQLite;
 
 =head1 NAME
 

Modified: DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/lib/sqlite.sql	2009-04-24 19:51:16 UTC (rev 5983)
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Sun Feb 22 00:15:06 2009
+-- Created on Sun Apr 19 11:49:48 2009
 -- 
 
 
@@ -137,6 +137,16 @@
 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 (
@@ -221,9 +231,12 @@
 --
 CREATE TABLE genre (
   genreid INTEGER PRIMARY KEY NOT NULL,
-  name varchar(100) NOT NULL
+  name varchar(100) NOT NULL,
+  demographicid integer NOT NULL
 );
 
+CREATE INDEX genre_idx_demographicid_genre ON genre (demographicid);
+
 CREATE UNIQUE INDEX genre_name_genre ON genre (name);
 
 --

Modified: DBIx-Class/0.08/branches/count_distinct/t/search/subquery.t
===================================================================
--- DBIx-Class/0.08/branches/count_distinct/t/search/subquery.t	2009-04-24 18:54:00 UTC (rev 5982)
+++ DBIx-Class/0.08/branches/count_distinct/t/search/subquery.t	2009-04-24 19:51:16 UTC (rev 5983)
@@ -26,7 +26,7 @@
   my ($query, @bind) = @{$$arr};
   is_same_sql_bind(
     $query, \@bind,
-    "SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE artist_id IN ( SELECT id FROM artist me LIMIT 1 )",
+    "( SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE artist_id IN ( SELECT id FROM artist me LIMIT 1 ) )",
     [],
   );
 }
@@ -45,7 +45,7 @@
   my ($query, @bind) = @{$$arr};
   is_same_sql_bind(
     $query, \@bind,
-    "SELECT (SELECT id FROM cd me LIMIT 1) FROM artist me",
+    "( SELECT (SELECT id FROM cd me LIMIT 1) FROM artist me )",
     [],
   );
 }
@@ -64,7 +64,7 @@
   my ($query, @bind) = @{$$arr};
   is_same_sql_bind(
     $query, \@bind,
-    "SELECT me.artistid, me.name, me.rank, me.charfield, (SELECT id FROM cd me LIMIT 1) FROM artist me",
+    "( SELECT me.artistid, me.name, me.rank, me.charfield, (SELECT id FROM cd me LIMIT 1) FROM artist me )",
     [],
   );
 }
@@ -85,7 +85,7 @@
   my ($query, @bind) = @{$$arr};
   is_same_sql_bind(
     $query, \@bind,
-    "SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track FROM (SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE id > 20) cd2",
+    "( SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track FROM (SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE id > 20) cd2 )",
     [],
   );
 }
@@ -103,7 +103,7 @@
   my ($query, @bind) = @{$$arr};
   is_same_sql_bind(
     $query, \@bind,
-    "SELECT me.artistid, me.name, me.rank, me.charfield FROM artist me JOIN (SELECT me.artist as cds_artist FROM cd me) cds ON me.artistid = cds_artist", []
+    "( SELECT me.artistid, me.name, me.rank, me.charfield FROM artist me JOIN (SELECT me.artist as cds_artist FROM cd me) cds ON me.artistid = cds_artist )", []
   );
 
 
@@ -132,13 +132,14 @@
   my ($query, @bind) = @{$$arr};
   is_same_sql_bind(
     $query, \@bind,
-    "SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track 
+    "( SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track 
       FROM 
         (SELECT cd3.cdid,cd3.artist,cd3.title,cd3.year,cd3.genreid,cd3.single_track 
           FROM 
             (SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track 
               FROM cd me WHERE id < 40) cd3
-          WHERE id > 20) cd2",
+          WHERE id > 20) cd2
+    )",
     [],
   );
 
@@ -157,7 +158,7 @@
   my ($query, @bind) = @{$$arr};
   is_same_sql_bind(
     $query, \@bind,
-    "SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE year = (SELECT MAX(inner.year) FROM cd inner WHERE artistid = me.artistid)",
+    "( SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE year = (SELECT MAX(inner.year) FROM cd inner WHERE artistid = me.artistid) )",
     [],
   );
 }




More information about the Bast-commits mailing list