coopernurse/gorp — pull request #174 by spencerkimball (2014-05-23 22:20:00+00:00)
Title: Added an "upsert" mechanism and associated unittests.

Upsert is a portmanteau for "update" and "insert". It allows a single
statement to either insert if the primary key is not presetn or update
if it is present.

The current implementation is MySQL specific and will return an error
for any other dialect. Support for this feature varies widely amongst
database vendors as it's not part of the SQL ansi standard. For MySQL,
we use the "ON DUPLICATE KEY UPDATE ..." suffix to insert statements.