added EXPIRES, PERSISTS, TTL, and EX keyword

This commit is contained in:
Josh Baker 2016-07-15 13:06:11 -07:00
parent 638c35b5b9
commit e766dd75ae
2 changed files with 120 additions and 2 deletions

View File

@ -19,7 +19,14 @@
"multiple": true "multiple": true
}, },
{ {
"name": "value", "command": "EX",
"name": ["seconds", "value"],
"type": ["string", "double"],
"optional": true,
"multiple": false
},
{
"name": "value",
"enumargs": [ "enumargs": [
{ {
"name": "OBJECT", "name": "OBJECT",
@ -93,6 +100,58 @@
"since": "1.0.0", "since": "1.0.0",
"group": "keys" "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": { "FSET": {
"summary": "Set the value for a single field of an id", "summary": "Set the value for a single field of an id",
"complexity": "O(1)", "complexity": "O(1)",

View File

@ -181,7 +181,14 @@ var commandsJSON = `{
"multiple": true "multiple": true
}, },
{ {
"name": "value", "command": "EX",
"name": ["seconds", "value"],
"type": ["string", "double"],
"optional": true,
"multiple": false
},
{
"name": "value",
"enumargs": [ "enumargs": [
{ {
"name": "OBJECT", "name": "OBJECT",
@ -255,6 +262,58 @@ var commandsJSON = `{
"since": "1.0.0", "since": "1.0.0",
"group": "keys" "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": { "FSET": {
"summary": "Set the value for a single field of an id", "summary": "Set the value for a single field of an id",
"complexity": "O(1)", "complexity": "O(1)",