twitter/querulous — pull request #39 by dstu (2012-02-24 21:36:55+00:00)
Title: Mix-in to provide customization of the properties of ResultSets generated by SqlQuery

I've run into a case where I would really like to be able to scroll backwards in the ResultSet produced by Query.select(). (Each domain object being populated from the select results needs information from several adjacent rows in the ResultSet, and the only way to determine when an object is fully populated is to scroll completely through all its rows into the next object's set of rows. Then, to keep from consuming a row it shouldn't, this process needs to scroll backwards a row.)

ResultSet properties are determined at Statement creation, but Statement creation is in a private method in SqlQuery. This is addressed in this patch by making an explicit trait for ResultSet generation, with a simple mixin for substituting values other than the de facto defaults.