Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update(self, table, where_col, where_cond, update_col, value):
- with engine.begin() as conn:
- stmt = (table.update(where_col == where_cond).values({update_col: value}))
- conn.execute(stmt)
- called with:
- zones.update().where(zones.c.name == self.name).values({zones.c.running: True})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement