Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def query_each(cursor, sql, param=()):
- cursor.execute(sql, param)
- while True:
- fetch = cursor.fetchone()
- if fetch is None:
- break
- yield fetch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement