chore(pubsub): update api status (#189)
chore(pubsub): update api status. Also make subcommand matching for pubsub case insensitive. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
55389d9be5
commit
c174b3bead
|
@ -147,8 +147,8 @@ with respect to Memcached and Redis APIs.
|
|||
- [X] HSCAN
|
||||
- [X] PubSub family
|
||||
- [X] PUBLISH
|
||||
- [ ] PUBSUB
|
||||
- [ ] PUBSUB CHANNELS
|
||||
- [X] PUBSUB
|
||||
- [X] PUBSUB CHANNELS
|
||||
- [X] SUBSCRIBE
|
||||
- [X] UNSUBSCRIBE
|
||||
- [X] PSUBSCRIBE
|
||||
|
|
|
@ -1054,7 +1054,9 @@ void Service::PubsubChannels(string_view pattern, ConnectionContext* cntx) {
|
|||
}
|
||||
|
||||
void Service::PubsubPatterns(ConnectionContext* cntx) {
|
||||
size_t pattern_count = shard_set->Await(0, [&] { return EngineShard::tlocal()->channel_slice().PatternCount(); });
|
||||
size_t pattern_count =
|
||||
shard_set->Await(0, [&] { return EngineShard::tlocal()->channel_slice().PatternCount(); });
|
||||
|
||||
(*cntx)->SendLong(pattern_count);
|
||||
}
|
||||
|
||||
|
@ -1064,6 +1066,7 @@ void Service::Pubsub(CmdArgList args, ConnectionContext* cntx) {
|
|||
return;
|
||||
}
|
||||
|
||||
ToUpper(&args[1]);
|
||||
string_view subcmd = ArgS(args, 1);
|
||||
|
||||
if (subcmd == "HELP") {
|
||||
|
@ -1081,7 +1084,7 @@ void Service::Pubsub(CmdArgList args, ConnectionContext* cntx) {
|
|||
}
|
||||
|
||||
if (subcmd == "CHANNELS") {
|
||||
string pattern;
|
||||
string_view pattern;
|
||||
if (args.size() > 2) {
|
||||
pattern = ArgS(args, 2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue