christopherhesse/rethinkgo — pull request #27 by karlseguin (2013-09-25 02:43:54+00:00)
Title: Introduced Runner API for cleaner client embedding

Introduced Runner interface which exposes a single method: Run(query Exp) *Rows. Exp.Run

now expects a Runner rather than a concrete *Session).

The purpose is to allow clients to cleanly embed Session (say to provide connection pooling):

type WrappedSession struct {
*rethinkgo.Session
}

Without the interface, you'd need to use `wrapper.Session` everywhere. With it, you can simply use `wrapper`.