Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

When I send the SCAN, how can I obtain the cursor and returned list? #199

Open
pengweichu opened this issue Sep 4, 2018 · 2 comments
Open

Comments

@pengweichu
Copy link

When I send the SCAN, how can I obtain the cursor and returned list?

Thanks

@pengweichu
Copy link
Author

Please help, thanks in advance.

@Eggache666
Copy link

	size_t cursor = 0;
	do
	{
		auto rep = client.scan(cursor, "keys*");
		client.sync_commit();
		auto res = rep.get().as_array();
		cursor = std::stoi(res[0].as_string());
		auto return_list = res[1].as_array();
                    // ...

	} while (cursor != 0);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants