redding/mr — pull request #101 by jcredding (2013-10-30 21:02:46+00:00)
Title: Add new interface for read model fields

This adds a new mixin `MR::ReadModel::Fields`. This mixin will
be used to update read models to provide an API for specifying
the fields that a read model should have. The mixin works with
the `Querying` mixin to automatically add `select` statements
to the read models relation for each field. This makes it
simple to add fields and select out there values. Furthermore,
fields will now type-cast there values based on the `type` that
is used when specifying the field. This value is memoized so
that read models to not repetitively type-cast there values.
This doesn't make any changes to the `MR::ReadModel` mixin yet,
this is just setup for changing it. This should make read models
more useful and also allow them to eventually work with an
`MR::Factory`.

Related to #88