redding/mr — pull request #212 by jcredding (2014-05-05 17:14:45+00:00)
Title: Update read model querying, ensure expression returned

This is a small set of updates to read model querying. These
changes are setup for supporting subqueries. This updates the
querying methods to ensure they return the expression they add and
also has them rescue any `ArgumentErrors` and re-raise them.
Changing the querying methods to return the expression they add
will be used by join subqueries to allow chaining on join
conditions. In some scenarios, this is a cleaner way of adding
join conditions than passing them to the join subquery methods.
Rescuing argument errors will also be used by the subquery
methods to inform developers they are not calling the method
correclty but not expose them to the internals of MR. This makes
sure that the other querying methods are consistent in how they
behave with the subquery methods.

This also includes some test cleanups. I moved some factory
and stack building to using the latest interface and commonized
some of the querying test helpers logic.

@kellyredding - Ready for review.