Skip to content

Commit a4df3e8

Browse files
committed
feat: add new DELEX, DIGEST, MSETEX commands; extend SET and XREADGROUP (#916)
Signed-off-by: Rueian <rueiancsie@gmail.com>
1 parent 84db6c1 commit a4df3e8

File tree

5 files changed

+764
-6
lines changed

5 files changed

+764
-6
lines changed

hack/cmds/commands.json

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,6 +1885,42 @@
18851885
"since": "1.0.0",
18861886
"group": "generic"
18871887
},
1888+
"DELEX": {
1889+
"arguments": [
1890+
{
1891+
"name": "key",
1892+
"type": "key"
1893+
},
1894+
{
1895+
"name": "condition",
1896+
"type": "oneof",
1897+
"arguments": [
1898+
{
1899+
"name": "ifeq",
1900+
"type": "string",
1901+
"token": "IFEQ"
1902+
},
1903+
{
1904+
"name": "ifne",
1905+
"type": "string",
1906+
"token": "IFNE"
1907+
},
1908+
{
1909+
"name": "ifdeq",
1910+
"type": "string",
1911+
"token": "IFDEQ"
1912+
},
1913+
{
1914+
"name": "ifdne",
1915+
"type": "string",
1916+
"token": "IFDNE"
1917+
}
1918+
],
1919+
"optional": true
1920+
}
1921+
],
1922+
"group": "string"
1923+
},
18881924
"DELIFEQ": {
18891925
"summary": "Delete key if value matches string.",
18901926
"complexity": "O(1)",
@@ -4837,6 +4873,51 @@
48374873
"since": "1.0.1",
48384874
"group": "string"
48394875
},
4876+
"MSETEX": {
4877+
"arguments": [
4878+
{
4879+
"name": "numkeys",
4880+
"type": "integer"
4881+
},
4882+
{
4883+
"name": [
4884+
"key",
4885+
"value"
4886+
],
4887+
"type": [
4888+
"key",
4889+
"string"
4890+
],
4891+
"multiple": true
4892+
},
4893+
{
4894+
"name": "condition",
4895+
"type": "enum",
4896+
"enum": [
4897+
"NX",
4898+
"XX"
4899+
],
4900+
"optional": true
4901+
},
4902+
{
4903+
"name": "expiration",
4904+
"type": "enum",
4905+
"enum": [
4906+
"EX seconds",
4907+
"PX milliseconds",
4908+
"EXAT timestamp",
4909+
"PXAT milliseconds-timestamp",
4910+
"KEEPTTL",
4911+
"EX sec-typed",
4912+
"PX ms-typed",
4913+
"EXAT timestamp-typed",
4914+
"PXAT ms-timestamp-typed"
4915+
],
4916+
"optional": true
4917+
}
4918+
],
4919+
"group": "string"
4920+
},
48404921
"MULTI": {
48414922
"summary": "Mark the start of a transaction block",
48424923
"since": "1.2.0",
@@ -5588,6 +5669,15 @@
55885669
"since": "1.0.0",
55895670
"group": "connection"
55905671
},
5672+
"DIGEST": {
5673+
"arguments": [
5674+
{
5675+
"name": "key",
5676+
"type": "key"
5677+
}
5678+
],
5679+
"group": "string"
5680+
},
55915681
"SET": {
55925682
"summary": "Set the string value of a key",
55935683
"complexity": "O(1)",
@@ -5618,6 +5708,21 @@
56185708
"name": "ifeq",
56195709
"type": "string",
56205710
"token": "IFEQ"
5711+
},
5712+
{
5713+
"name": "ifne",
5714+
"type": "string",
5715+
"token": "IFNE"
5716+
},
5717+
{
5718+
"name": "ifdeq",
5719+
"type": "string",
5720+
"token": "IFDEQ"
5721+
},
5722+
{
5723+
"name": "ifdne",
5724+
"type": "string",
5725+
"token": "IFDNE"
56215726
}
56225727
],
56235728
"optional": true
@@ -7059,6 +7164,12 @@
70597164
],
70607165
"optional": true
70617166
},
7167+
{
7168+
"name": "CLAIM",
7169+
"type": "string",
7170+
"token": "CLAIM",
7171+
"optional": true
7172+
},
70627173
{
70637174
"name": "streams",
70647175
"type": "enum",

internal/cmds/gen_stream.go

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/cmds/gen_stream_test.go

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)