I have a scenario where i need to achieve pagination from backend service. If my table has 40000 records then i need to fetch only 1000 record at a time and not all record in one go. when user clicks next button then only next 1000 records needs to be fetched.
Workflow:
Currently i have 2 tables as shown below:
First i fetch list of uuid from given datetime range from below table
CREATE TABLE employee_attaindance_by_uid_index ( id int, hour timestamp, timestamp timestamp, uid uuid, PRIMARY KEY ((id, hour), timestamp, uid)
then i query multiple cql to get list of records based on uid,
eg: for(String uuid in list) {
select * from employee_details_by_uid where uid = xyz1
select * from employee_details_by_uid where uid = xyz1
select * from employee_details_by_uid where uid = xyz3
}
CREATE TABLE employee_details_by_uid ( uid uuid PRIMARY KEY, android_id text, ' ' ' ' '
here employee_details_by_uid table has single key i.e uid
Now till now i checked how pagination is achieved by using tokens, fetch size and offsets etc.
But in my case my final result is coming from list of different result set show above and not in single query result set.
How can i achieve pagination in this scenario?