Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the XINFO command #301

Merged
merged 2 commits into from
Mar 13, 2021

Conversation

jxnu-liguobin
Copy link
Collaborator

@jxnu-liguobin jxnu-liguobin commented Mar 2, 2021

#233
Refer to the design of jedis.It provide three method(sub command) as follows:

  void xinfoStream (String key);

  void xinfoGroup (String key);

  void xinfoConsumers (String key, String group);

Thefull option are not included.

Redis documents tell us that we can't rely on the number and order of returned fields, and we should record undefined fields. This is different from the implementation of jedis, in which all the original records are stored in a Map[String, Object].

Use undefined to record potentially unsupported fields.

@jxnu-liguobin jxnu-liguobin requested a review from a team as a code owner March 2, 2021 10:17
@jxnu-liguobin jxnu-liguobin marked this pull request as draft March 2, 2021 10:17
@jxnu-liguobin jxnu-liguobin marked this pull request as ready for review March 3, 2021 06:06
@jxnu-liguobin jxnu-liguobin marked this pull request as draft March 3, 2021 06:07
@jxnu-liguobin jxnu-liguobin marked this pull request as ready for review March 5, 2021 02:16
@mijicd
Copy link
Member

mijicd commented Mar 10, 2021

cc @anovakovic01

Copy link
Member

@anovakovic01 anovakovic01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @jxnu-liguobin! With few changes, it will be ready for merge.

redis/src/main/scala/zio/redis/Input.scala Outdated Show resolved Hide resolved
redis/src/main/scala/zio/redis/Output.scala Outdated Show resolved Hide resolved
redis/src/main/scala/zio/redis/Output.scala Outdated Show resolved Hide resolved
redis/src/main/scala/zio/redis/Output.scala Outdated Show resolved Hide resolved
redis/src/main/scala/zio/redis/Output.scala Outdated Show resolved Hide resolved
redis/src/test/scala/zio/redis/OutputSpec.scala Outdated Show resolved Hide resolved
redis/src/test/scala/zio/redis/OutputSpec.scala Outdated Show resolved Hide resolved
redis/src/test/scala/zio/redis/OutputSpec.scala Outdated Show resolved Hide resolved
@jxnu-liguobin
Copy link
Collaborator Author

@anovakovic01 Please take a look

Copy link
Member

@anovakovic01 anovakovic01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@anovakovic01 anovakovic01 changed the title support xInfo cmd Add support for the XINFO command Mar 13, 2021
@anovakovic01 anovakovic01 merged commit 49dcd10 into zio:master Mar 13, 2021
@jxnu-liguobin jxnu-liguobin deleted the support-xinfo-cmd branch March 14, 2021 06:09
@mijicd mijicd mentioned this pull request Mar 14, 2021
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants