Skip to content

Instantly share code, notes, and snippets.

@narenaryan
Last active January 10, 2021 18:29
Show Gist options
  • Select an option

  • Save narenaryan/b2510a161c6962c7f5783919a89defd4 to your computer and use it in GitHub Desktop.

Select an option

Save narenaryan/b2510a161c6962c7f5783919a89defd4 to your computer and use it in GitHub Desktop.
cursor-illu
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