What does ListKeysAsync() cursor parameter do?

I have looked at the documentation and it doesn’t really say whats its for so im confused

3 Likes

I know what ListKeysAsync() does, all i wanna know is what the 3rd parameter is for.

2 Likes

Mb I misread the title, this should help you.
From what I understand it’s basically a pointer that points to the next page so that you don’t have to iterate all over the list, but the documentation is extremely vague so I cannot tell if that’s correct or not.

2 Likes

The cursor parameter is used to retrieve the next page of results.
For example when you call ListKeysAsync without a cursor, it returns the first page of keys. The returned DataStoreKeyPages object will include a cursor if there are additional pages.

2 Likes

But can’t you just do AdvanceToNextPageAsync() instead

2 Likes

AdvanceToNextPageAsync() will get you into the next page, for example there are 5 pages. With AdvanceToNextPageAsync() you will go to the page 2, but with cursor you can go to the page 4 or 5.

3 Likes