skydb/sky — pull request #146 by matthelm (2013-09-24 18:28:17+00:00)
Title: Finalize

Hey Ben,

Here's a stab at adding a `Finalize` step to `SelectionField`. You'll notice that my implementation for `distinct` and `average` are almost identical. All they do is abstract away the aggregation object into a single value. Should I dry these up? I changed 'avg' to 'average' to ensure the test caught that I needed to use `f.Name` instead of hard-coding it.

What do you think? I'm starting to feel a bit more comfortable, but this PR required me asking Steve a few Go questions.

Best,
Matt