sewenew / redis-plus-plus

Redis client written in C++
Apache License 2.0
1.6k stars 347 forks source link

[QUESTION] LPOS command #516

Closed FaerHack closed 1 year ago

FaerHack commented 1 year ago

Are there plans to implement LPOS command?

sewenew commented 1 year ago

I'll try to add it in the future, but the priority is low. However, before that, you can use the generic interface to to send LPOS command:

auto r = Redis("tcp://127.0.0.1");
auto pos = r.command<Optional<long long>>("LPOS", "key", "element");  // When there's no COUNT option, it might return a nil reply, and we need specify the type as `Optional`.

auto result = r.command<std::vector<long long>>("LPOS", "key", "element", "count",3);

Regards

sewenew commented 1 year ago

Since there's no update, I'll close this issue.

Regards