immudb-py icon indicating copy to clipboard operation
immudb-py copied to clipboard

New parameter for sqlQuery()

Open pranavrd opened this issue 3 years ago • 1 comments
trafficstars

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)

pranavrd avatar Apr 28 '22 04:04 pranavrd

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]

Razikus avatar Apr 29 '22 16:04 Razikus