Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New parameter for sqlQuery() #42

Open
pranavrd opened this issue Apr 28, 2022 · 1 comment
Open

New parameter for sqlQuery() #42

pranavrd opened this issue Apr 28, 2022 · 1 comment

Comments

@pranavrd
Copy link

A select query fetches only up to a 1000 records.
Can this be modified to fetch r number of records?
For e.g.:
results = client.sqlQuery(queryStr,r=100000)

@Razikus
Copy link
Collaborator

Razikus commented Apr 29, 2022

Hi. Currently you have to ensure to chunk your response per 1000 entries.

You should provide some PRIMARY KEY, like ID INTEGER AUTO_INCREMENT
then query it like this

SELECT id, something FROM XXX WHERE ID > @lastId LIMIT 1000

Then make assigment lastId = result[-1][0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants