Let SQL objects support .setdefault() and .delete()
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Sun, 19 Feb 2012 11:14:58 +0000 (12:14 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Sun, 26 Feb 2012 18:46:44 +0000 (19:46 +0100)
commitc60bbe07c558b2f13501cb16d18b61022715b380
treea409618237e88d8b76a5e564a16636fe8f77cf23
parent8efcd4055804f5dba99cced70fd4fb7876a88e5e
Let SQL objects support .setdefault() and .delete()

Some parts in the code like to use .setdefault(). So make
them happy and provide a minimal version. It ignores the
given default and expects the attribute to already exist.

Other parts use .delete() to delete a complete object. This
version expects the object to live in a session and also
does the final commit.
mediagoblin/db/sql/base.py