Advertisement
MD500_Pilot

Untitled

Apr 13th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def update(self, table, where_col, where_cond, update_col, value):
  2. with engine.begin() as conn:
  3. stmt = (table.update(where_col == where_cond).values({update_col: value}))
  4. conn.execute(stmt)
  5.  
  6.  
  7. called with:
  8.  
  9. zones.update().where(zones.c.name == self.name).values({zones.c.running: True})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement