diff --git a/core/commands.json b/core/commands.json index 75791672..135b6e34 100644 --- a/core/commands.json +++ b/core/commands.json @@ -19,7 +19,14 @@ "multiple": true }, { - "name": "value", + "command": "EX", + "name": ["seconds", "value"], + "type": ["string", "double"], + "optional": true, + "multiple": false + }, + { + "name": "value", "enumargs": [ { "name": "OBJECT", @@ -93,6 +100,58 @@ "since": "1.0.0", "group": "keys" }, + "EXPIRE": { + "summary": "Set a timeout on an id", + "complexity": "O(1)", + "arguments":[ + { + "name": "key", + "type": "string" + }, + { + "name": "id", + "type": "string" + }, + { + "name": "seconds", + "type": "double" + } + ], + "since": "1.0.0", + "group": "keys" + }, + "TTL": { + "summary": "Get a timeout on an id", + "complexity": "O(1)", + "arguments":[ + { + "name": "key", + "type": "string" + }, + { + "name": "id", + "type": "string" + } + ], + "since": "1.0.0", + "group": "keys" + }, + "PERSIST": { + "summary": "Remove the existing timeout on an id", + "complexity": "O(1)", + "arguments":[ + { + "name": "key", + "type": "string" + }, + { + "name": "id", + "type": "string" + } + ], + "since": "1.0.0", + "group": "keys" + }, "FSET": { "summary": "Set the value for a single field of an id", "complexity": "O(1)", diff --git a/core/commands_gen.go b/core/commands_gen.go index 3a68e3ba..8e9a4fee 100644 --- a/core/commands_gen.go +++ b/core/commands_gen.go @@ -181,7 +181,14 @@ var commandsJSON = `{ "multiple": true }, { - "name": "value", + "command": "EX", + "name": ["seconds", "value"], + "type": ["string", "double"], + "optional": true, + "multiple": false + }, + { + "name": "value", "enumargs": [ { "name": "OBJECT", @@ -255,6 +262,58 @@ var commandsJSON = `{ "since": "1.0.0", "group": "keys" }, + "EXPIRE": { + "summary": "Set a timeout on an id", + "complexity": "O(1)", + "arguments":[ + { + "name": "key", + "type": "string" + }, + { + "name": "id", + "type": "string" + }, + { + "name": "seconds", + "type": "double" + } + ], + "since": "1.0.0", + "group": "keys" + }, + "TTL": { + "summary": "Get a timeout on an id", + "complexity": "O(1)", + "arguments":[ + { + "name": "key", + "type": "string" + }, + { + "name": "id", + "type": "string" + } + ], + "since": "1.0.0", + "group": "keys" + }, + "PERSIST": { + "summary": "Remove the existing timeout on an id", + "complexity": "O(1)", + "arguments":[ + { + "name": "key", + "type": "string" + }, + { + "name": "id", + "type": "string" + } + ], + "since": "1.0.0", + "group": "keys" + }, "FSET": { "summary": "Set the value for a single field of an id", "complexity": "O(1)",