Skip to content

Instantly share code, notes, and snippets.

@rjosephwright
Last active December 20, 2015 02:59
Show Gist options
  • Save rjosephwright/6060454 to your computer and use it in GitHub Desktop.
Save rjosephwright/6060454 to your computer and use it in GitHub Desktop.
q = Query()
q.add("UPDATE TRANSACTIONS SET STATUS=? WHERE ID=?", [new_status, id])
q.run()
# To get a result, use get()
result = q.get()
# Or chain run() and get()
result = q.run().get()
# Or chain the whole thing
result = Query().add("SELECT * FROM TRANSACTIONS WHERE ID=?", [id]).run().get()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment