-
Hi all, I am trying to implement record paging using immugorm, but it seems ImmuDB does not support the OFFSET keyword as it is generated by Gorm. The query generated by gorm looks like this: SELECT * FROM locations WHERE locations.deleted_at IS NULL LIMIT 5 OFFSET 5 But based on what I read, it seems the OFFSET keyword is used to read the transaction history. This query as it is does not work on immuDB's web console. Is there a way to filter the records in this way? What I need is a way to tell the SQL engine to skip the first X records returned by the query. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @tutiplain Just implemented It would be great if you could build from the branch of this PR Note: While standard Advanced note: In a more scalable pagination method, each query would be solved using the latest index entry read so far, then in the where clause, include a condition based on the indexed columns to reduce rows to be skipped. |
Beta Was this translation helpful? Give feedback.
Hi @tutiplain
Just implemented
OFFSET
capabilities.It would be great if you could build from the branch of this PR
https://github.com/codenotary/immudb/pull/1242
Note: While standard
OFFSET
is simple it may lead to scalability issues as a scan is done over skipped entries.Advanced note: In a more scalable pagination method, each query would be solved using the latest index entry read so far, then in the where clause, include a condition based on the indexed columns to reduce rows to be skipped.