Fetch limited data from database

how to get limited data from database and rest data on next call of rpc (means how to implement pagination on data). i am using lua for server side scripting in nakama.

@kmsudhir The storage engine already provides an API which returns a cursor which can be used to fetch the follow on page of results. This is a pattern we use across all the server APIs.

thanks for quick reply but i need to use this cursor with friend list. please suggest how to use with the friendlist.

@kmsudhir I don’t understand your use case. If you want to page over friends on the server-side there’s already a Server Framework function to do that which returns a cursor. If you want to page over results in a storage collection that is covered in the documentation I linked above.