Last active
January 10, 2021 18:29
-
-
Save narenaryan/b2510a161c6962c7f5783919a89defd4 to your computer and use it in GitHub Desktop.
cursor-illu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PAGINATION_COUNT = 5 | |
| with connect(**config) as conn: | |
| with conn.cursor() as cur: | |
| cur.execute(sql_query, ["John%"]) | |
| res = cur.fetchmany(PAGINATION_COUNT): | |
| # You only get 5 rows at max |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment