Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

Make sure insert and update bubble up whether anything was actually written #11

Closed Jaymon closed 8 years ago

Jaymon commented 8 years ago

Create an object Foo:

f = Foo()
f.bar = 1
f.che = None

now only update if our Foo instance doesn't have a None che:

Foo.query.set_bar(2).is_bar(f.bar).not_che(None).update()

That should return False because it wouldn't actually update the row, but it also wouldn't fail.

Jaymon commented 8 years ago

I'm not sure why I can never remember the syntax to close a freaking issue from the repo, sigh