alevy / postgresql-orm

An Haskell ORM (Object Relational Mapping) and migrations DSL for PostgreSQL.
http://simple.cx
GNU General Public License v3.0
78 stars 12 forks source link

Add RETURNING clause to UPDATE queries #14

Closed charles-cooper closed 8 years ago

charles-cooper commented 8 years ago

This commit adds a RETURNING clause to UPDATE queries. Previously the provided model was simply returned to the user, but this is wrong if there are row-level triggers on the table. Adding RETURNING allows us to return the correct model to the user.

Fixes https://github.com/alevy/postgresql-orm/issues/13

alevy commented 8 years ago

:+1: thanks!