11 years agoStill do null-branch pruning when we are using our own inflate_result()
Peter Rabbitson [Tue, 5 Mar 2013 05:49:53 +0000]
Still do null-branch pruning when we are using our own inflate_result()

52864fbd was too aggressive in removing stuff - inheritance no longer
matters, but which method we will be calling does. If we are still using
our own inflate_result() there is no point of doing the double work of
blessing and then skipping null branches.

11 years agoForgotten cruft after 52864fbd5
Peter Rabbitson [Tue, 5 Mar 2013 01:55:51 +0000]
Forgotten cruft after 52864fbd5

11 years agoRename some private methods/attributes to align with what they do
Peter Rabbitson [Thu, 28 Feb 2013 17:12:26 +0000]
Rename some private methods/attributes to align with what they do

No functional changes, just a s///

11 years agoRemove some superfluous expensive try blocks
Peter Rabbitson [Thu, 28 Feb 2013 07:44:08 +0000]
Remove some superfluous expensive try blocks

We already know that the relationship exists, and ->related_source without
a schema returns undef anyway

11 years agoSimplify more - remove loop and cleanup the while cond
Peter Rabbitson [Thu, 28 Feb 2013 07:48:11 +0000]
Simplify more - remove loop and cleanup the while cond

11 years agoAn underdefined root has to use the %cur_row_ids container
Peter Rabbitson [Wed, 27 Feb 2013 10:19:43 +0000]
An underdefined root has to use the %cur_row_ids container

Otherwise we are polluting $cur_row_data with the extra "virtual id column"
value, and may end up stashing it back on iterative cursor parsing

11 years agoMOAR optimization - tracking is_new_res is double work
Peter Rabbitson [Wed, 27 Feb 2013 10:01:12 +0000]
MOAR optimization - tracking is_new_res is double work

We can get the root node assembler to do that for us instead

Also remove more of the superfluous ||= assignments

11 years agoBAIL_OUT stops the entire test run - do not want that
Peter Rabbitson [Wed, 27 Feb 2013 09:35:17 +0000]
BAIL_OUT stops the entire test run - do not want that

11 years agoScale back validation of the 'as' attribute (revert 95e41036)
Peter Rabbitson [Sun, 24 Feb 2013 17:45:23 +0000]
Scale back validation of the 'as' attribute (revert 95e41036)

It turned out that users employ invalid-but-sensical inflation maps in
production. Remove the early sanity check of the infmap and move the code
throwing an exception all the way back to ::Row

Follow through this thread for more details:
http://lists.scsys.co.uk/pipermail/dbix-class/2013-February/011115.html

11 years agoClarify result_class tweaking on active/cached cursors
Peter Rabbitson [Sun, 24 Feb 2013 16:56:53 +0000]
Clarify result_class tweaking on active/cached cursors

We need this to simplify logic of result_class type caching

11 years agoRemove test cruft forgotten after 52864fbd
Peter Rabbitson [Sun, 24 Feb 2013 10:49:58 +0000]
Remove test cruft forgotten after 52864fbd

11 years agoDo not rely on Data::Dumper to produce rolled out hashrefs
Peter Rabbitson [Sun, 24 Feb 2013 10:41:58 +0000]
Do not rely on Data::Dumper to produce rolled out hashrefs

11 years agoMerge branch 'master' into topic/constructor_rewrite
Peter Rabbitson [Sun, 10 Mar 2013 11:10:06 +0000]
Merge branch 'master' into topic/constructor_rewrite

11 years agoAbraxxa-proof the distbuild (disallow `make manifest dist`)
Peter Rabbitson [Sun, 10 Mar 2013 10:21:30 +0000]
Abraxxa-proof the distbuild (disallow `make manifest dist`)

This does not work under dmake (there is no $(MAKECMDGOALS)), but it does
not seem to have adverse effects either

11 years agoExclude DBICTest namespace from stacktraces
Peter Rabbitson [Sun, 10 Mar 2013 10:05:06 +0000]
Exclude DBICTest namespace from stacktraces

11 years agoAugment 1b6cbedd (reverting my moronic use of preamble in EU::MM)
Peter Rabbitson [Fri, 8 Mar 2013 17:00:57 +0000]
Augment 1b6cbedd (reverting my moronic use of preamble in EU::MM)

Instead of whacking things during the MY::distdir override, properly
override MY::postamble for upload prereq check injection

11 years agomove the location of the extra upload checks so it isn't the default target
Graham Knop [Fri, 8 Mar 2013 16:56:39 +0000]
move the location of the extra upload checks so it isn't the default target

This should result in equivalent behavior since it is still before the
main upload rule.

11 years agoMore comprehensive test of qualifier stripping for update/delete
Peter Rabbitson [Fri, 8 Mar 2013 10:06:33 +0000]
More comprehensive test of qualifier stripping for update/delete

11 years agoChange the rt link from one requiring a login to a publicly accessible one
Christian Walde [Tue, 5 Mar 2013 16:24:28 +0000]
Change the rt link from one requiring a login to a publicly accessible one

Also switch to https:// whatever can be reasonably switched

11 years agoReorganize and freshen up the DocMap
Peter Rabbitson [Tue, 5 Mar 2013 05:22:24 +0000]
Reorganize and freshen up the DocMap

It accumulated lots of stuff that is confusing / not relevant for beginners

11 years agoMove DocMap link to top of DBIx::Class to prevent it being missed
Christian Walde [Mon, 4 Mar 2013 13:28:33 +0000]
Move DocMap link to top of DBIx::Class to prevent it being missed

Reorganize the section to be a bit more comprehensive

11 years agoRemove outdated (and kinda offensive) CONTRIBUTING text
Peter Rabbitson [Tue, 5 Mar 2013 03:47:07 +0000]
Remove outdated (and kinda offensive) CONTRIBUTING text

A replacement should come shortly, courtesy of Getty

11 years agoAnd more fulltest dep conflicts
Peter Rabbitson [Tue, 5 Mar 2013 05:52:21 +0000]
And more fulltest dep conflicts

11 years agoClarify wtf do we have a _bool
Peter Rabbitson [Tue, 5 Mar 2013 03:25:11 +0000]
Clarify wtf do we have a _bool

11 years agoRequire latest EU::MM at dist-building time to avoid $-escaping issues
Christian Walde [Fri, 1 Mar 2013 17:08:19 +0000]
Require latest EU::MM at dist-building time to avoid $-escaping issues

11 years agoDo not auto-install dist-building dependencies in author mode
Peter Rabbitson [Sat, 2 Mar 2013 06:16:46 +0000]
Do not auto-install dist-building dependencies in author mode

Instead only require them for actual make dist/distdir/upload runs

11 years agoSmoke all branches on travis except for blocked* and wip/*
Peter Rabbitson [Fri, 1 Mar 2013 16:02:03 +0000]
Smoke all branches on travis except for blocked* and wip/*

11 years agoAnother adjustment of travis depinstall order
Peter Rabbitson [Fri, 1 Mar 2013 15:41:20 +0000]
Another adjustment of travis depinstall order

11 years agoPunt TODO until the dateops work merges
Peter Rabbitson [Fri, 1 Mar 2013 09:05:38 +0000]
Punt TODO until the dateops work merges

11 years agoThis infrastructure was removed ages ago by 263e41be
Peter Rabbitson [Fri, 1 Mar 2013 08:46:54 +0000]
This infrastructure was removed ages ago by 263e41be

11 years agoRemove TODO that could never be made to work (revert c49fcf72)
Peter Rabbitson [Fri, 1 Mar 2013 08:42:15 +0000]
Remove TODO that could never be made to work (revert c49fcf72)

I do not know what groditi was thinking - the behavior codified makes 0 sense

11 years agoRelease v0.08209 v0.08209
Alexander Hartmaier [Fri, 1 Mar 2013 13:09:42 +0000]
Release v0.08209

11 years agoFulltests deps clarification
Peter Rabbitson [Thu, 28 Feb 2013 14:46:48 +0000]
Fulltests deps clarification

- CDBI::Plugin::DeepAbstractSearch already depends on CDBI
- Install DateTime earlier in the CLEANTEST=false cycle

11 years agoGuard against exceptions in _describe_connection
Peter Rabbitson [Thu, 28 Feb 2013 09:02:56 +0000]
Guard against exceptions in _describe_connection

Stuff like this happens otherwise:
http://lists.scsys.co.uk/pipermail/dbix-class/2013-January/011085.html

11 years agoWhitespace-check the travis scripts as well
Peter Rabbitson [Wed, 27 Feb 2013 12:32:00 +0000]
Whitespace-check the travis scripts as well

11 years agoShuffle travis CLEANTEST=false depchain again
Peter Rabbitson [Wed, 27 Feb 2013 10:33:13 +0000]
Shuffle travis CLEANTEST=false depchain again

11 years agoTest::Strict is smarter now
Peter Rabbitson [Wed, 27 Feb 2013 10:27:50 +0000]
Test::Strict is smarter now

11 years agoRegex /o is *EVIL* - no idea why I even thought of using that
Peter Rabbitson [Mon, 18 Feb 2013 07:37:54 +0000]
Regex /o is *EVIL* - no idea why I even thought of using that

11 years agoWarn on signs of Moose-borkage (in case it gets to be the first new())
Peter Rabbitson [Tue, 26 Feb 2013 08:08:44 +0000]
Warn on signs of Moose-borkage (in case it gets to be the first new())

11 years agoAdjust CLEANTEST=false depinstall a bit more
Peter Rabbitson [Sat, 23 Feb 2013 15:16:45 +0000]
Adjust CLEANTEST=false depinstall a bit more

11 years agoFix cookbook - missing cond in 'Equivalent SQL'
David Schmidt [Wed, 20 Feb 2013 13:46:08 +0000]
Fix cookbook - missing cond in 'Equivalent SQL'

11 years agoInstrument the lockfile creation failure
Peter Rabbitson [Sat, 23 Feb 2013 14:52:50 +0000]
Instrument the lockfile creation failure

Attempting to get to the bottom of http://www.cpantesters.org/cpan/report/27f16417-89ea-1014-a33e-b361b1e9163f

11 years agoFix regression breaking search on prefetched rel (broken by 5e2a0518)
Peter Rabbitson [Sat, 23 Feb 2013 14:17:47 +0000]
Fix regression breaking search on prefetched rel (broken by 5e2a0518)

Boy 0.08205 was a bad release, so much crap went in undetected by
any of our tests :( Maybe it's time for Devel::Cover...?

11 years agoUncomment disabled test (not sure why it was)
Peter Rabbitson [Sat, 23 Feb 2013 14:13:32 +0000]
Uncomment disabled test (not sure why it was)

11 years agoEXPERIMENTAL Release v0.08241 v0.08241
Peter Rabbitson [Wed, 20 Feb 2013 10:56:29 +0000]
EXPERIMENTAL Release v0.08241

11 years agoClarify prefetch documentation a bit, remove the nonsensical 0.09 warning
Peter Rabbitson [Wed, 20 Feb 2013 11:05:31 +0000]
Clarify prefetch documentation a bit, remove the nonsensical 0.09 warning

11 years agoSanity-check columns added as primary key
Peter Rabbitson [Wed, 20 Feb 2013 10:49:45 +0000]
Sanity-check columns added as primary key

11 years agoOptimize the HRI-direct collapser even more
Peter Rabbitson [Wed, 20 Feb 2013 10:12:35 +0000]
Optimize the HRI-direct collapser even more

Since we know that we will never output null-branches in the case of
HRI, we can wrap the related assemblers in a definedness condition to
never fire on a null branch, and skip entirely the calculation of
non-NULL %cur_row_ids.

11 years agoFatalize warnings within the compiled row parsers
Peter Rabbitson [Tue, 19 Feb 2013 20:57:13 +0000]
Fatalize warnings within the compiled row parsers

Encountering an undef value anywhere in this code is a sign of some glaring
omission. Perhaps a nullable column is annotated as is_nullable => 0 or
something similar. When this is the case we need the collapsing to stop
right there, as it is no longer safe to proceed.

11 years agoModify the null-branch pruning introduced in ce556881, restore compat
Peter Rabbitson [Tue, 19 Feb 2013 20:54:16 +0000]
Modify the null-branch pruning introduced in ce556881, restore compat

In the case of "direct to HRI" we want to throw stuff away as before. In
other cases however we no longer take an educated guess when to prune.
Instead we mark each null-branch by simply blessing its containing
arrayref. This allows us to keep the arguments to inflate_result 100%
backwards compatible, while at the same time allowing "enlightened"
inflate_result implementations to skip over the dead branches with
minimal effort.

Both ::Row::inflate_result and ::HRI::inflate_result were adjusted to
react correctly to these marks. As a result the HRI folder gained
another 5% speedup (unless sidestepped by the direct-to-HRI code, which
is naturally much much more efficient).

The current name of the "null class" is stored in the global
$DBIx::Class::ResultSource::RowParser::Util::null_branch_class. Given
that the entire codebase begs for standalone CPAN extraction this should
do for the time being.

While implementing the test changes it became clear that
Test::More::is_deeply does not cut it (it ignores the blessed-ness of
structures by design: https://github.com/schwern/test-more/issues/347).
As a result a dep on Test::Deep was added, and several of the tests
looking at inflate_result RVs were converted.

11 years agoAdd optdep on CPAN::Uploader to get an effortless `make upload`
Peter Rabbitson [Wed, 20 Feb 2013 09:57:03 +0000]
Add optdep on CPAN::Uploader to get an effortless `make upload`

11 years agoEven more distbuilding checks
Peter Rabbitson [Wed, 20 Feb 2013 09:35:00 +0000]
Even more distbuilding checks

Frew's environment (and *only* his environment) keeps producing weirdly
broken dists. Add an extra check for this until we figure out how exactly
his environment is broken.

Extra check tested on cygwin and strawberry for good measure.

11 years agoRelease v0.08208 v0.08208
Peter Rabbitson [Wed, 20 Feb 2013 09:58:31 +0000]
Release v0.08208

11 years agoAdd optdep on CPAN::Uploader to get an effortless `make upload`
Peter Rabbitson [Wed, 20 Feb 2013 09:57:03 +0000]
Add optdep on CPAN::Uploader to get an effortless `make upload`

11 years agoEven more distbuilding checks
Peter Rabbitson [Wed, 20 Feb 2013 09:35:00 +0000]
Even more distbuilding checks

Frew's environment (and *only* his environment) keeps producing weirdly
broken dists. Add an extra check for this until we figure out how exactly
his environment is broken.

Extra check tested on cygwin and strawberry for good measure.

11 years agoNew Test::Strict no longer detects Moose::Role (RT#83433) - workaround
Peter Rabbitson [Mon, 18 Feb 2013 20:22:26 +0000]
New Test::Strict no longer detects Moose::Role (RT#83433) - workaround

11 years agoReadjust the parallel no-test dependency install order
Peter Rabbitson [Sat, 16 Feb 2013 16:44:54 +0000]
Readjust the parallel no-test dependency install order

Better utilize the massive amount of CPUs we have available

11 years agoIt appears that travis drastically increased the amount of available CPUs
Peter Rabbitson [Sat, 16 Feb 2013 16:05:12 +0000]
It appears that travis drastically increased the amount of available CPUs

Well, this is awesome - we just happen to be equipped to take advantage
of this ;)

Remove the branch-name limitations - now a smoke takes fraction of the time
it used to, no point to limit what we smoke anymore.

At the same time reduce the amount of threads building the perls - older
binaries do not build very well on -j32. This is a temporary thing - the
perl-building will soon be exported away anyway.

11 years agoNew Test::Strict no longer detects Moose::Role (RT#83433) - workaround
Peter Rabbitson [Mon, 18 Feb 2013 20:22:26 +0000]
New Test::Strict no longer detects Moose::Role (RT#83433) - workaround

11 years agoPrevent SQL::Translator::Producer::YAML from seeing our potential $dbh
Peter Rabbitson [Sat, 16 Feb 2013 15:27:23 +0000]
Prevent SQL::Translator::Producer::YAML from seeing our potential $dbh

The failure mode here is extremely convoluted, full of unimaginable fail
and makes baby jesus cry :(

The long story: there are two ways to supply a $schema to the SQLT producer:
via an argument to translate() (sane) or at the time of translator instance
creation (less sane). In the second case this becomes a problem because some
serializing producers (e.g. SQLT::Producer::YAML) take the *entire*
SQLT instance and dump it to YAML. This includes the arguments which include
our schema with its storage and potentially its $dbh. This causes the
weird warnings described in e.g. RT#75394, because YAML creates a dead
DBI object upon de-serialization of said arguments. What's even more sad is
that while the YAML Producer dumps the entire SQLT instance, the YAML Parser
simply takes the ->{schema} part of this structure and throws everything
else away.

Of course we can not just fix the ::Producer - folks may very well be relying
on the structure it spits out (nobody knows if the *only* consumer of the
Producer::YAML output is in fact Parser::YAML). Really the only thing we can
know (well not know, but reasonably assume) is that there is no way that any
user relies on the accessing the storage passed in with a schema instance to
be parsed.

So what we do is the least invasive thing of all - at translate() time we
check the state of the passed in $schema and if it does have a storage
instance we simply detach it (by cloning the $schema instance) and as a
result everything remains happy.

11 years agoDeprecate the insane forest of SQLT::Parser::DBIC arguments
Peter Rabbitson [Sat, 16 Feb 2013 15:12:50 +0000]
Deprecate the insane forest of SQLT::Parser::DBIC arguments

It seems like things have been just piled up with no plan nor reason. Bring in
the broom - converge on an argument name that actuall makes sense - dbic_schema

11 years agoReadjust the parallel no-test dependency install order
Peter Rabbitson [Sat, 16 Feb 2013 16:44:54 +0000]
Readjust the parallel no-test dependency install order

Better utilize the massive amount of CPUs we have available

11 years agoIt appears that travis drastically increased the amount of available CPUs
Peter Rabbitson [Sat, 16 Feb 2013 16:05:12 +0000]
It appears that travis drastically increased the amount of available CPUs

Well, this is awesome - we just happen to be equipped to take advantage
of this ;)

Remove the branch-name limitations - now a smoke takes fraction of the time
it used to, no point to limit what we smoke anymore.

At the same time reduce the amount of threads building the perls - older
binaries do not build very well on -j32. This is a temporary thing - the
perl-building will soon be exported away anyway.

11 years agoFix minor docs issues in ResultSet changes
Brendan Byrd [Fri, 15 Feb 2013 19:16:16 +0000]
Fix minor docs issues in ResultSet changes

11 years agoMore (temporary) kwalitee fixups
Peter Rabbitson [Fri, 15 Feb 2013 08:48:50 +0000]
More (temporary) kwalitee fixups

11 years agoEXPERIMENTAL Release 0.08240 v0.08240
Peter Rabbitson [Thu, 14 Feb 2013 05:59:27 +0000]
EXPERIMENTAL Release 0.08240

Adjust the distbuilding to tag 240~249 releases as TRIAL, aiming for
0.08250 as "DBIC with sane prefetch".

Massive thanks to mna for enduring hours of pondering on the design and
implementation - this code would not exist without your help.

11 years agoRudimentary documentation
Peter Rabbitson [Sun, 4 Mar 2012 07:37:26 +0000]
Rudimentary documentation

11 years agoReintroduce conditional null-branch pruning and add direct-to-HRI option
Peter Rabbitson [Mon, 11 Feb 2013 16:07:16 +0000]
Reintroduce conditional null-branch pruning and add direct-to-HRI option

What we do here is heavy parameterization of the rowparser coderef generator.

The first change introduces pruning of "null" left joined branches. In the
case of the collapsing codepath things are easy - we already precalculated
definitive non-nullable column sets describing each node separately. All we
need to do is check that the *first* node-specific id is not-NULL, and we
are in business. In the case of non-collapsing parsers things get ugly - we
do not have a collapse map (it can't be calculated most of the time) and
we do not yet have lightweight "left-join-ness" analysis. So instead we treat
any branch with *all* of its values (current node + leaves) being NULL as
a "left joined" branch. This should eventually be fixed, because it prevents
reliable selection of branches with all-nullable columns.

To make matters even more complicated - we can not prune by default, because
this was not the case for older code (and the format of data fed to
inflate_result has been public API for a long time). Since DBIx::Class::Row
no longer does prunning internaly in its inflate_result we need to compromise
(it was in fact necessary to remove that naive pruning code to allow empty
intermediate objects). The pruning is engaged automatically on any
result class that inherits from DBIx::Class::Row, with the hope that any
overrides of inflate_result do superficial modifications to the data before
passing it on. If the class is entirely new (i.e. *not* part of the ::Row
inheritance chain) - we do not prune and return everything the way we did up
until 0.08206 or so.

There is currently no way to influence the pruning behavior from the user API
which is *probably* a problem, but I am punting it.

The second change introduces the hri_style flag, which alters the resulting
structure to be a direct HRI product (everything is mixed in one hashref,
relationships clobber identically named coluns). Thus we do not invoke the HRI
inflate_result() at all anymore (it is left in for the casual overrider), but
return things in a single pass. There aren't much more performance gains to
be had here, next step would be leaner ResultSet initialization.

The switch and decision-caching in ResultSet.pm that powers the above got
rather hairy, but I couldn't figure out a saner way to properly dispatch to
the necessary rowparser builder. The rest of the changes turned out
surprisingly clean and unobtrusive.

11 years agoOptimization - order only on lazy prefetch
Peter Rabbitson [Sat, 3 Mar 2012 15:56:12 +0000]
Optimization - order only on lazy prefetch

If the user wants all() without an order_by she doesn't care anyway

11 years agoAnd another collapser issue
Peter Rabbitson [Mon, 11 Feb 2013 11:19:49 +0000]
And another collapser issue

One can not infer definedness from the presence of a parent *unless* we have
a 'belongs_to'-like relationship to that parent

11 years agoYet another collapser oversight
Peter Rabbitson [Sun, 10 Feb 2013 09:15:06 +0000]
Yet another collapser oversight

One can't reuse collapsers across a left join

11 years agoSimplify collapse map contents, shuffle things around, rename most vars
Peter Rabbitson [Sat, 9 Feb 2013 11:18:15 +0000]
Simplify collapse map contents, shuffle things around, rename most vars

There are almost no functional changes, just better organize what goes where

11 years agoMove the infmap verification/exception way earlier
Peter Rabbitson [Fri, 8 Feb 2013 15:16:04 +0000]
Move the infmap verification/exception way earlier

The thing deliberately is not a method on the source, because I am not
entirely sure where it belongs *YET*. Just knew it does not belong
in the (hopefully) extractable parser-gens.

11 years agoConvert in_storage() to a simple accessor (potentially XSifyable)
Peter Rabbitson [Tue, 12 Feb 2013 13:11:36 +0000]
Convert in_storage() to a simple accessor (potentially XSifyable)

11 years agoRemove ResultSourceHandle check in inflate_result
Peter Rabbitson [Tue, 12 Feb 2013 11:47:51 +0000]
Remove ResultSourceHandle check in inflate_result

A isa() check is expensive, and it seems like the work in 4376a1574 made
it entirely superfluous

11 years agoSwitch the cursor iterator to pull data via bind_columns
Peter Rabbitson [Tue, 12 Feb 2013 11:27:10 +0000]
Switch the cursor iterator to pull data via bind_columns

While this does not help us irectly in any way (we still copy by value like
there is no tomorrow) - it will help with the software_limit fast-forwards

11 years agoMassively optimize ->cursor->next while fixing some bugs along the way
Peter Rabbitson [Wed, 19 Sep 2012 07:26:44 +0000]
Massively optimize ->cursor->next while fixing some bugs along the way

Cursor access was previously wrapped in a dbh_do() block with the intent to
restart the connection and the cursor upon a handle error. However this
arrangement overlooks our inability to restart the cursor from the same
spot (or for that matter guarantee the same dataset). Instead we remove
the dbh_do wrap entirely, and just let the exception propagate to whatever
esle might be ready to catch it (and potentially properly retry the select).

As a side effect (because anonsubs are sloooooooow) the end result
yields astonishing speed gains - one of the test cases mentioned in [1]
went (on my test rig) from 9.61058 to 0.64960 due to this commit alone.

A particular detail - the cursor private methods _dbh_next/_dbh_all are no
more as they are unused indirection now. All storage drivers (well their
respective cursors) have been adjusted, but not yet tested due to lack of
a proper environment.

[1] http://lists.scsys.co.uk/pipermail/dbix-class/2012-July/010595.html

11 years agoRestore ability to handle underdefined root (t/prefetch/incomplete.t)
Peter Rabbitson [Thu, 3 Jan 2013 03:01:36 +0000]
Restore ability to handle underdefined root (t/prefetch/incomplete.t)

In addition make things work when multiple has_many-inheriting branches
are present on the root. This squeezes in the last thing I could think
of into the row_parser maker, and allows to *properly* collapse stuff
like this:

$rs = $schema->resultset ('CD')->search ({}, {
  join => [ 'tracks', { single_track => { cd => { artist => { cds => 'tracks' } } } }  ],
  collapse => 1,
  columns => [
    { 'single_track.trackid'                    => 'single_track.trackid' },  # definitive link to root from 1:1:1:1:M:M chain
    { 'year'                                    => 'me.year' },               # non-unique
    { 'tracks.cd'                               => 'tracks.cd' },             # \ together both uniqueness for second multirel
    { 'tracks.title'                            => 'tracks.title' },          # / and definitive link back to root
    { 'single_track.cd.artist.cds.cdid'         => 'cds.cdid' },              # to give uniquiness to ...tracks.title below
    { 'single_track.cd.artist.cds.year'         => 'cds.year' },              # non-unique
    { 'single_track.cd.artist.artistid'         => 'artist.artistid' },       # uniqufies entire parental chain
    { 'single_track.cd.artist.cds.genreid'      => 'cds.genreid' },           # nullable
    { 'single_track.cd.artist.cds.tracks.title' => 'tracks_2.title' },        # unique when combined with ...cds.cdid above
  ],
  order_by => \ 'RANDOM()'
});

Which DBIC sees like this ( produced by `prove -l t/prefetch/manual.t -v` ):

 sngl_tr.trackid #        me.year #       tracks.cd #    tracks.title #        cds.cdid #        cds.year # artist.artistid #     cds.genreid #  tracks_2.title
---------------------------------------------------------------------------------------------------------------------------------------------------------------
               6 #           1978 #               3 #              e2 #               1 #            1981 #               1 #               1 #              m3
            NULL #           1977 #            NULL #            NULL #            NULL #            NULL #            NULL #            NULL #            NULL
               6 #           1978 #               3 #              e3 #               5 #            1977 #               1 #            NULL #            NULL
               6 #           1978 #               3 #              e1 #               1 #            1981 #               1 #               1 #              m1
               6 #           1978 #               3 #              e2 #               3 #            1978 #               1 #               1 #              e1
            NULL #           1981 #               1 #              m1 #            NULL #            NULL #            NULL #            NULL #            NULL
               6 #           1978 #               3 #              e2 #               1 #            1981 #               1 #               1 #              m1
               6 #           1978 #               3 #              e3 #               3 #            1978 #               1 #               1 #              e3
               6 #           1978 #               3 #              e3 #               2 #            1976 #               1 #            NULL #              o2
               6 #           1978 #               3 #              e2 #               6 #            1977 #               1 #            NULL #            NULL
            NULL #           1981 #               1 #              m3 #            NULL #            NULL #            NULL #            NULL #            NULL
               6 #           1978 #               3 #              e3 #               1 #            1981 #               1 #               1 #              m1
               6 #           1978 #               3 #              e1 #               2 #            1976 #               1 #            NULL #              o2
               6 #           1978 #               3 #              e3 #               1 #            1981 #               1 #               1 #              m3
               6 #           1978 #               3 #              e2 #               3 #            1978 #               1 #               1 #              e2
               6 #           1978 #               3 #              e2 #               4 #            1977 #               1 #            NULL #            NULL
               6 #           1978 #               3 #              e1 #               6 #            1977 #               1 #            NULL #            NULL
               6 #           1978 #               3 #              e2 #               5 #            1977 #               1 #            NULL #            NULL
               6 #           1978 #               3 #              e1 #               3 #            1978 #               1 #               1 #              e2
               6 #           1978 #               3 #              e1 #               3 #            1978 #               1 #               1 #              e1
            NULL #           1976 #               2 #              o1 #            NULL #            NULL #            NULL #            NULL #            NULL
            NULL #           1976 #               2 #              o2 #            NULL #            NULL #            NULL #            NULL #            NULL
               6 #           1978 #               3 #              e1 #               1 #            1981 #               1 #               1 #              m2
               6 #           1978 #               3 #              e1 #               5 #            1977 #               1 #            NULL #            NULL
               6 #           1978 #               3 #              e2 #               2 #            1976 #               1 #            NULL #              o1
               6 #           1978 #               3 #              e2 #               1 #            1981 #               1 #               1 #              m2
               6 #           1978 #               3 #              e1 #               1 #            1981 #               1 #               1 #              m4
               6 #           1978 #               3 #              e3 #               1 #            1981 #               1 #               1 #              m2
               6 #           1978 #               3 #              e2 #               2 #            1976 #               1 #            NULL #              o2
               6 #           1978 #               3 #              e3 #               3 #            1978 #               1 #               1 #              e1
               6 #           1978 #               3 #              e3 #               1 #            1981 #               1 #               1 #              m4
               6 #           1978 #               3 #              e1 #               3 #            1978 #               1 #               1 #              e3
            NULL #           1977 #            NULL #            NULL #            NULL #            NULL #            NULL #            NULL #            NULL
               6 #           1978 #               3 #              e1 #               1 #            1981 #               1 #               1 #              m3
               6 #           1978 #               3 #              e3 #               2 #            1976 #               1 #            NULL #              o1
               6 #           1978 #               3 #              e1 #               2 #            1976 #               1 #            NULL #              o1
               6 #           1978 #               3 #              e2 #               1 #            1981 #               1 #               1 #              m4
               6 #           1978 #               3 #              e3 #               3 #            1978 #               1 #               1 #              e2
            NULL #           1977 #            NULL #            NULL #            NULL #            NULL #            NULL #            NULL #            NULL
            NULL #           1981 #               1 #              m2 #            NULL #            NULL #            NULL #            NULL #            NULL
               6 #           1978 #               3 #              e3 #               6 #            1977 #               1 #            NULL #            NULL
               6 #           1978 #               3 #              e2 #               3 #            1978 #               1 #               1 #              e3
               6 #           1978 #               3 #              e3 #               4 #            1977 #               1 #            NULL #            NULL
               6 #           1978 #               3 #              e1 #               4 #            1977 #               1 #            NULL #            NULL
            NULL #           1981 #               1 #              m4 #            NULL #            NULL #            NULL #            NULL #            NULL

11 years agoTest for restricted prefetch (now passing again after previous commit)
Rafael Kitover [Thu, 5 Jul 2012 17:03:44 +0000]
Test for restricted prefetch (now passing again after previous commit)

11 years agoFix _resolve_collapse to always consider the entire chain of parent ids
Peter Rabbitson [Mon, 28 Jan 2013 11:20:45 +0000]
Fix _resolve_collapse to always consider the entire chain of parent ids

Instead of relying on a "local column based" resolution for a particular
node, always add all the "collapsers" of the left-side "parents".

In the process cleanup the return of _resolve_collapse, and make it more
generic (after all we are hoping to CPAN the collapser generator some
day).

The change above  solves the following problem: think of an artist with
3 CDs A, B & C:

$cd_rs->search(
  [
    { 'me.title' => 'A', 'cds.title' => { '!=' => 'B' } },
    { 'me.title' => { '!=', => 'A' }, 'cds.title' => 'B' },
  ],
  { prefetch => { artist => 'cds' } },
);

Since an artist is fully defined by its PK (which we already fetch),
an all() run will keep accumulating all 3 CDs under the same already
known hash, representing said artist, because we do not create two
distinct pigeon-hole-hashes for "artist of A" and "artist of non-A".

11 years agoETOOMANYARGS - change _resolve_collapse to take a couple hashes
Peter Rabbitson [Tue, 22 Jan 2013 14:18:23 +0000]
ETOOMANYARGS - change _resolve_collapse to take a couple hashes

No functional changes

11 years agoWrite correct odd (not even) relchain depth on primary joins
Peter Rabbitson [Sun, 27 Jan 2013 19:10:34 +0000]
Write correct odd (not even) relchain depth on primary joins

11 years agoAdded test for join and empty prefetch exception
Alexander Hartmaier [Thu, 2 Aug 2012 12:38:52 +0000]
Added test for join and empty prefetch exception

(Now passing after previous commit)

11 years agoUnset collapse in even more cases
Peter Rabbitson [Sat, 26 Jan 2013 16:25:33 +0000]
Unset collapse in even more cases

11 years agoFixups for 5.17.6+ hash randomization
Peter Rabbitson [Tue, 29 Jan 2013 00:14:10 +0000]
Fixups for 5.17.6+ hash randomization

11 years agoHit an MC hash-order bug - simplify create, and solve it another time
Peter Rabbitson [Mon, 28 Jan 2013 21:48:05 +0000]
Hit an MC hash-order bug - simplify create, and solve it another time
(test saved and augmented in another branch)

11 years agoReverting a48693f42e - the test is a fat duplicate of t/prefetch/false_colvalues.t
Peter Rabbitson [Fri, 21 Dec 2012 10:05:40 +0000]
Reverting a48693f42e - the test is a fat duplicate of t/prefetch/false_colvalues.t

11 years agoFix the silly mistake responsible for the drama around c9733800
Peter Rabbitson [Sat, 26 Jan 2013 15:44:37 +0000]
Fix the silly mistake responsible for the drama around c9733800

A perlcritic policy to catch this stuff in the future is under consideration

11 years agoMerge branch 'master' into topic/constructor_rewrite
Peter Rabbitson [Thu, 14 Feb 2013 04:58:09 +0000]
Merge branch 'master' into topic/constructor_rewrite

11 years agoMoar kwalitee - we do have pod(coverage) tests
Peter Rabbitson [Thu, 14 Feb 2013 04:41:20 +0000]
Moar kwalitee - we do have pod(coverage) tests

11 years agoAdd strict/warnings test, adjust all offenders (wow, that was a lot)
Peter Rabbitson [Wed, 13 Feb 2013 22:20:29 +0000]
Add strict/warnings test, adjust all offenders (wow, that was a lot)

Should shut kwalitee up: http://cpants.cpanauthors.org/dist/DBIx-Class

11 years agoStop shipping world writeable files in our tarball
Peter Rabbitson [Wed, 13 Feb 2013 18:39:57 +0000]
Stop shipping world writeable files in our tarball

The chain of failures would go as follows: when we prepare the tarball
we briefly copy all generated POD to our root dir so that the
manifest/distdir_copy process can pick it up. Then before the distdir is
ready we run a cleanup using ExtUtils::Install::uninstall. However
everything in the ditdir is hardlinked to our root dir, including the
files we "uninstall". EU::I::uninstall has a weird dance deep in its
source[1] where it explicitly does chmod(0666) on the file it is about
to delete (why?!). Thus we end up with world-writables in our distdir,
since the hardlinked inode still retains the result of that last chmod.

Switch to a manual cleanup, and leave EU::I alone.

[1] https://metacpan.org/source/YVES/ExtUtils-Install-1.54/lib/ExtUtils/Install.pm#L274

11 years agoFix duplicated columns for count()
André Walker [Wed, 13 Feb 2013 15:47:17 +0000]
Fix duplicated columns for count()

When a same aggregate function was used more than once in a 'having'
clause, count() added that function more than once to 'select'.

11 years agorelease v0.08206 v0.08206
Alexander Hartmaier [Mon, 11 Feb 2013 17:59:09 +0000]
release v0.08206

11 years agoTry Schwern's latest Test::Builder offering on a stock perl and a threaded blead
Peter Rabbitson [Thu, 7 Feb 2013 05:21:22 +0000]
Try Schwern's latest Test::Builder offering on a stock perl and a threaded blead

11 years agoReorganize travis stuff a little - no functional changes
Peter Rabbitson [Thu, 7 Feb 2013 05:10:43 +0000]
Reorganize travis stuff a little - no functional changes

11 years agoTry to config Fibrebird twice - it does seem to help >.<
Peter Rabbitson [Thu, 7 Feb 2013 04:06:24 +0000]
Try to config Fibrebird twice - it does seem to help >.<

Read changeset under -w

11 years agoTemporary workaround for Path::Class not being installable (RT#83143)
Peter Rabbitson [Thu, 7 Feb 2013 04:04:37 +0000]
Temporary workaround for Path::Class not being installable (RT#83143)

11 years agoChangelogging for 728f32b5 and e705f529
Peter Rabbitson [Fri, 1 Feb 2013 06:55:04 +0000]
Changelogging for 728f32b5 and e705f529

11 years agoRevert parts of 6864429a which utterly broke dbh_do() retries
Peter Rabbitson [Fri, 1 Feb 2013 06:50:15 +0000]
Revert parts of 6864429a which utterly broke dbh_do() retries

Was never noticed because of undertesting, now should behave correctly