Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦境迷离
Zio Redis
提交
ad41feca
Z
Zio Redis
项目概览
梦境迷离
/
Zio Redis
10 个月 前同步成功
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
Zio Redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
ad41feca
编写于
4月 12, 2020
作者:
L
Landlocked Surfer
提交者:
GitHub
4月 12, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add missing strings commands (#21)
上级
c0f6f91b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
129 addition
and
45 deletion
+129
-45
src/main/scala/zio/redis/Input.scala
src/main/scala/zio/redis/Input.scala
+37
-27
src/main/scala/zio/redis/api/SortedSets.scala
src/main/scala/zio/redis/api/SortedSets.scala
+1
-1
src/main/scala/zio/redis/api/Strings.scala
src/main/scala/zio/redis/api/Strings.scala
+41
-7
src/main/scala/zio/redis/options/Shared.scala
src/main/scala/zio/redis/options/Shared.scala
+10
-0
src/main/scala/zio/redis/options/SortedSets.scala
src/main/scala/zio/redis/options/SortedSets.scala
+0
-7
src/main/scala/zio/redis/options/Strings.scala
src/main/scala/zio/redis/options/Strings.scala
+39
-0
src/main/scala/zio/redis/options/package.scala
src/main/scala/zio/redis/options/package.scala
+1
-3
未找到文件。
src/main/scala/zio/redis/Input.scala
浏览文件 @
ad41feca
...
...
@@ -10,33 +10,43 @@ import scala.util.matching.Regex
sealed
trait
Input
[
-A
]
object
Input
{
case
object
ByteInput
extends
Input
[
Chunk
[
Byte
]]
case
object
DoubleInput
extends
Input
[
Double
]
case
object
DurationInput
extends
Input
[
Duration
]
case
object
LongInput
extends
Input
[
Long
]
case
object
MatchInput
extends
Input
[
Regex
]
case
object
UnitInput
extends
Input
[
Unit
]
case
object
RangeInput
extends
Input
[
Range
]
case
object
StringInput
extends
Input
[
String
]
case
object
TimeInput
extends
Input
[
Instant
]
case
object
SortedSetMemberScoreInput
extends
Input
[
options.MemberScore
]
case
object
SortedSetUpdateInput
extends
Input
[
options.Updates
]
case
object
SortedSetChangedInput
extends
Input
[
options.CH
]
case
object
SortedSetIncrementInput
extends
Input
[
options.INCR
]
case
object
SortedSetAggregateInput
extends
Input
[
options.Aggregate
]
case
object
SortedSetLexRangeInput
extends
Input
[
options.LexRange
]
case
object
SortedSetWithScoresInput
extends
Input
[
options.WithScores
]
case
object
SortedSetLimitInput
extends
Input
[
options.Limit
]
case
object
SortedSetScoreRangeInput
extends
Input
[
options.ScoreRange
]
case
object
GeoCountInput
extends
Input
[
options.Count
]
case
object
GeoLongLatInput
extends
Input
[
options.LongLat
]
case
object
GeoOrderInput
extends
Input
[
options.Order
]
case
object
GeoRadiusUnitInput
extends
Input
[
options.RadiusUnit
]
case
object
GeoStoreInput
extends
Input
[
options.Store
]
case
object
GeoStoreDistInput
extends
Input
[
options.StoreDist
]
case
object
GeoWithCoordInput
extends
Input
[
options.WithCoord
]
case
object
GeoWithDistInput
extends
Input
[
options.WithDist
]
case
object
GeoWithHashInput
extends
Input
[
options.WithHash
]
case
object
BoolInput
extends
Input
[
Boolean
]
case
object
ByteInput
extends
Input
[
Chunk
[
Byte
]]
case
object
DoubleInput
extends
Input
[
Double
]
case
object
DurationInput
extends
Input
[
Duration
]
case
object
LongInput
extends
Input
[
Long
]
case
object
MatchInput
extends
Input
[
Regex
]
case
object
UnitInput
extends
Input
[
Unit
]
case
object
RangeInput
extends
Input
[
Range
]
case
object
StringInput
extends
Input
[
String
]
case
object
TimeInput
extends
Input
[
Instant
]
case
object
SortedSetMemberScoreInput
extends
Input
[
options.MemberScore
]
case
object
SortedSetUpdateInput
extends
Input
[
options.Updates
]
case
object
SortedSetChangedInput
extends
Input
[
options.CH
]
case
object
SortedSetIncrementInput
extends
Input
[
options.INCR
]
case
object
SortedSetAggregateInput
extends
Input
[
options.Aggregate
]
case
object
SortedSetLexRangeInput
extends
Input
[
options.LexRange
]
case
object
SortedSetWithScoresInput
extends
Input
[
options.WithScores
]
case
object
SortedSetLimitInput
extends
Input
[
options.Limit
]
case
object
SortedSetScoreRangeInput
extends
Input
[
options.ScoreRange
]
case
object
GeoCountInput
extends
Input
[
options.Count
]
case
object
GeoLongLatInput
extends
Input
[
options.LongLat
]
case
object
GeoOrderInput
extends
Input
[
options.Order
]
case
object
GeoRadiusUnitInput
extends
Input
[
options.RadiusUnit
]
case
object
GeoStoreInput
extends
Input
[
options.Store
]
case
object
GeoStoreDistInput
extends
Input
[
options.StoreDist
]
case
object
GeoWithCoordInput
extends
Input
[
options.WithCoord
]
case
object
GeoWithDistInput
extends
Input
[
options.WithDist
]
case
object
GeoWithHashInput
extends
Input
[
options.WithHash
]
case
object
StringBitFieldGetInput
extends
Input
[
options.BitFieldGet
]
case
object
StringBitFieldSetInput
extends
Input
[
options.BitFieldSet
]
case
object
StringBitFieldIncrInput
extends
Input
[
options.BitFieldIncr
]
case
object
StringBitFieldOverflowInput
extends
Input
[
options.BitFieldOverflow
]
case
object
StringBitOperationInput
extends
Input
[
options.BitOperation
]
case
object
StringBitPosRangeInput
extends
Input
[
options.BitPosRange
]
case
object
StringExpirationInput
extends
Input
[
options.Expiration
]
case
object
StringKeepTimeToLiveInput
extends
Input
[
options.KEEPTTL
]
case
object
UpdatesInput
extends
Input
[
options.Updates
]
final
case
class
OptionalInput
[
-A
](
a
:
Input
[
A
])
extends
Input
[
Option
[
A
]]
...
...
src/main/scala/zio/redis/api/SortedSets.scala
浏览文件 @
ad41feca
...
...
@@ -12,7 +12,7 @@ trait SortedSets {
"ZADD"
,
Tuple5
(
StringInput
,
OptionalInput
(
SortedSetUpdate
Input
),
OptionalInput
(
Updates
Input
),
OptionalInput
(
SortedSetChangedInput
),
OptionalInput
(
SortedSetIncrementInput
),
NonEmptyList
(
SortedSetMemberScoreInput
)
...
...
src/main/scala/zio/redis/api/Strings.scala
浏览文件 @
ad41feca
...
...
@@ -5,8 +5,31 @@ import zio.redis.Input._
import
zio.redis.Output._
trait
Strings
{
final
val
append
=
Command
(
"APPEND"
,
Tuple2
(
StringInput
,
ByteInput
),
LongOutput
)
final
val
bitcount
=
Command
(
"BITCOUNT"
,
Tuple2
(
StringInput
,
OptionalInput
(
RangeInput
)),
LongOutput
)
final
val
append
=
Command
(
"APPEND"
,
Tuple2
(
StringInput
,
ByteInput
),
LongOutput
)
final
val
bitcount
=
Command
(
"BITCOUNT"
,
Tuple2
(
StringInput
,
OptionalInput
(
RangeInput
)),
LongOutput
)
final
val
bitfield
=
Command
(
"BITFIELD"
,
Tuple5
(
StringInput
,
OptionalInput
(
NonEmptyList
(
StringBitFieldGetInput
)),
OptionalInput
(
NonEmptyList
(
StringBitFieldSetInput
)),
OptionalInput
(
NonEmptyList
(
StringBitFieldIncrInput
)),
OptionalInput
(
NonEmptyList
(
StringBitFieldOverflowInput
))
),
StreamOutput
)
final
val
bitop
=
Command
(
"BITOP"
,
Tuple3
(
StringBitOperationInput
,
StringInput
,
NonEmptyList
(
StringInput
)
),
LongOutput
)
final
val
bitpos
=
Command
(
"BITPOS"
,
Tuple3
(
StringInput
,
BoolInput
,
OptionalInput
(
StringBitPosRangeInput
)),
LongOutput
)
final
val
decr
=
Command
(
"DECR"
,
StringInput
,
LongOutput
)
final
val
decrby
=
Command
(
"DECRBY"
,
Tuple2
(
StringInput
,
LongInput
),
LongOutput
)
final
val
get
=
Command
(
"GET"
,
StringInput
,
ByteOutput
)
...
...
@@ -20,9 +43,20 @@ trait Strings {
final
val
mset
=
Command
(
"MSET"
,
NonEmptyList
(
Tuple2
(
StringInput
,
ByteInput
)),
UnitOutput
)
final
val
msetnx
=
Command
(
"MSETNX"
,
NonEmptyList
(
Tuple2
(
StringInput
,
ByteInput
)),
BoolOutput
)
final
val
psetex
=
Command
(
"PSETEX"
,
Tuple3
(
StringInput
,
DurationInput
,
ByteInput
),
UnitOutput
)
final
val
setbit
=
Command
(
"SETBIT"
,
Tuple3
(
StringInput
,
LongInput
,
ByteInput
),
ByteOutput
)
final
val
setex
=
Command
(
"SETEX"
,
Tuple3
(
StringInput
,
DurationInput
,
ByteInput
),
UnitOutput
)
final
val
setnx
=
Command
(
"SETNX"
,
Tuple2
(
StringInput
,
ByteInput
),
BoolOutput
)
final
val
setrange
=
Command
(
"SETRANGE"
,
Tuple3
(
StringInput
,
LongInput
,
ByteInput
),
LongOutput
)
final
val
strlen
=
Command
(
"STRLEN"
,
StringInput
,
LongOutput
)
final
val
set
=
Command
(
"SET"
,
Tuple5
(
StringInput
,
ByteInput
,
OptionalInput
(
StringExpirationInput
),
OptionalInput
(
UpdatesInput
),
OptionalInput
(
StringKeepTimeToLiveInput
)
),
OptionalOutput
(
UnitOutput
)
)
final
val
setbit
=
Command
(
"SETBIT"
,
Tuple3
(
StringInput
,
LongInput
,
ByteInput
),
ByteOutput
)
final
val
setex
=
Command
(
"SETEX"
,
Tuple3
(
StringInput
,
DurationInput
,
ByteInput
),
UnitOutput
)
final
val
setnx
=
Command
(
"SETNX"
,
Tuple2
(
StringInput
,
ByteInput
),
BoolOutput
)
final
val
setrange
=
Command
(
"SETRANGE"
,
Tuple3
(
StringInput
,
LongInput
,
ByteInput
),
LongOutput
)
final
val
strlen
=
Command
(
"STRLEN"
,
StringInput
,
LongOutput
)
}
src/main/scala/zio/redis/options/Shared.scala
0 → 100644
浏览文件 @
ad41feca
package
zio.redis.options
trait
Shared
{
sealed
trait
Updates
object
Updates
{
case
object
XX
extends
Updates
case
object
NX
extends
Updates
}
}
src/main/scala/zio/redis/options/SortedSets.scala
浏览文件 @
ad41feca
...
...
@@ -46,13 +46,6 @@ trait SortedSets {
case
object
WithScores
type
WithScores
=
WithScores
.
type
sealed
trait
Updates
object
Updates
{
case
object
XX
extends
Updates
case
object
NX
extends
Updates
}
case
object
CH
type
CH
=
CH
.
type
case
object
INCR
...
...
src/main/scala/zio/redis/options/Strings.scala
0 → 100644
浏览文件 @
ad41feca
package
zio.redis.options
trait
Strings
{
sealed
trait
BitFieldType
object
BitFieldType
{
sealed
case
class
UnsignedInt
(
size
:
Int
)
extends
BitFieldType
sealed
case
class
SignedInt
(
size
:
Int
)
extends
BitFieldType
}
case
class
BitFieldGet
(
`type`
:
BitFieldType
,
offset
:
Int
)
case
class
BitFieldSet
(
`type`
:
BitFieldType
,
offset
:
Int
,
value
:
BigInt
)
case
class
BitFieldIncr
(
`type`
:
BitFieldType
,
offset
:
Int
,
increment
:
BigInt
)
sealed
trait
BitFieldOverflow
object
BitFieldOverflow
{
case
object
FAIL
extends
BitFieldOverflow
case
object
SAT
extends
BitFieldOverflow
case
object
WRAP
extends
BitFieldOverflow
}
sealed
trait
BitOperation
object
BitOperation
{
case
object
AND
extends
BitOperation
case
object
OR
extends
BitOperation
case
object
XOR
extends
BitOperation
}
case
class
BitPosRange
(
start
:
Long
,
end
:
Option
[
Long
])
sealed
trait
Expiration
object
Expiration
{
sealed
case
class
EX
(
seconds
:
Long
)
extends
Expiration
sealed
case
class
PX
(
milliSeconds
:
Long
)
extends
Expiration
}
case
object
KEEPTTL
type
KEEPTTL
=
KEEPTTL
.
type
}
src/main/scala/zio/redis/options/package.scala
浏览文件 @
ad41feca
package
zio.redis
package
object
options
extends
SortedSets
with
Geo
{
// common options
}
package
object
options
extends
Geo
with
Shared
with
SortedSets
with
Strings
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录