opscode/sqerl — pull request #45 by seth (2014-04-26 03:53:42+00:00)
Title:  Support for INSERT ... RETURNING queries

Postgresql allows INSERT queries to return data via RETURNING. This is
especially useful to return values generated by the DB such as sequence
values and time stamps.

This patch introduces a new return type as:

{ok, Count, Rows}

Providing the return value in this form most closely matches what comes
back from pg. For the happy path case, there's little value in providing
the count as that should match the number of rows returned; an alternate
API would detect this case internally and return it as simply `{ok,
Rows}`. For now, aligning with the data returned by the DB seemed like
the right starting place.

ping @opscode/delivery @sdelano