- Notifications
You must be signed in to change notification settings - Fork64
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Streams api#1000#1039
Streams api#1000#1039
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Few minor remarks, otherwise LGTM
import zio.redis.internal.{RedisCommand, RedisEnvironment} | ||
import zio.redis.{Input, _} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
importzio.redis.{Input,_} | |
importzio.redis._ |
sealed trait CappedStreamLiterals { | ||
val maxLenLiteral: RespCommandArgument.Literal = RespCommandArgument.Literal("MAXLEN") | ||
val minIdLiteral: RespCommandArgument.Literal = RespCommandArgument.Literal("MINID") | ||
val approxLiteral: RespCommandArgument.Literal = RespCommandArgument.Literal("~") | ||
val exactLiteral: RespCommandArgument.Literal = RespCommandArgument.Literal("=") | ||
val limitLiteral: RespCommandArgument.Literal = RespCommandArgument.Literal("LIMIT") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Two things:
CappedStreamLiterals
should probably be private (perhaps even removed)- if removed, I'd follow the constant naming/definition scheme, e.g.
private final val MaxLenLiteral
} | ||
case object MaxLenApproxInput extends Input[CappedStreamType.MaxLenApprox] with CappedStreamLiterals { | ||
override private[redis] def encode(data: CappedStreamType.MaxLenApprox): RespCommand = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nit: let's ditch theoverride private[redis]
everywhere.
@mijicd Ok, I addressed your comments ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Sorry for another nitpick, I missed it in the first pass.
PR to Fix Extend Streams API#1000