mirror of https://github.com/tidwall/tile38.git
832 lines
17 KiB
JSON
832 lines
17 KiB
JSON
{
|
|
"SET":{
|
|
"summary": "Sets the value of an id",
|
|
"complexity": "O(1)",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"name": "string"
|
|
},
|
|
{
|
|
"command": "FIELD",
|
|
"name": ["name", "value"],
|
|
"type": ["string", "double"],
|
|
"optional": true,
|
|
"multiple": true
|
|
},
|
|
{
|
|
"name": "value",
|
|
"enumargs": [
|
|
{
|
|
"name": "OBJECT",
|
|
"arguments":[
|
|
{
|
|
"name": "geojson",
|
|
"type": "geojson"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "POINT",
|
|
"arguments":[
|
|
{
|
|
"name": "lat",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "lon",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "z",
|
|
"type": "double",
|
|
"optional": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "BOUNDS",
|
|
"arguments":[
|
|
{
|
|
"name": "minlat",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "minlon",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "maxlat",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "maxlon",
|
|
"type": "double"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "HASH",
|
|
"arguments":[
|
|
{
|
|
"name": "geohash",
|
|
"type": "geohash"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "crud"
|
|
},
|
|
"FSET": {
|
|
"summary": "Set the value for a single field of an id",
|
|
"complexity": "O(1)",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "field",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "double"
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "crud"
|
|
},
|
|
"GET": {
|
|
"summary": "Get the object of an id",
|
|
"complexity": "O(1)",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "type",
|
|
"optional": true,
|
|
"enumargs": [
|
|
{
|
|
"name": "OBJECT"
|
|
},
|
|
{
|
|
"name": "POINT"
|
|
},
|
|
{
|
|
"name": "BOUNDS"
|
|
},
|
|
{
|
|
"name": "HASH",
|
|
"arguments": [
|
|
{
|
|
"name": "precision",
|
|
"type": "integer"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "crud"
|
|
},
|
|
"DEL": {
|
|
"summary": "Delete an id from a key",
|
|
"complexity": "O(1)",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "crud"
|
|
},
|
|
"DROP": {
|
|
"summary": "Remove a key from the database",
|
|
"complexity": "O(1)",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "crud"
|
|
},
|
|
"KEYS": {
|
|
"summary": "Finds all keys matching the given pattern",
|
|
"complexity": "O(N) where N is the number of keys in the database",
|
|
"arguments":[
|
|
{
|
|
"name": "pattern",
|
|
"type": "pattern"
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "crud"
|
|
},
|
|
"STATS": {
|
|
"summary": "Show stats for one or more keys",
|
|
"complexity": "O(N) where N is the number of keys being requested",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string",
|
|
"variadic": true
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "crud"
|
|
},
|
|
|
|
"SCAN": {
|
|
"summary": "Incrementally iterate though a key",
|
|
"complexity": "O(N) where N is the number of ids in the key",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"command": "CURSOR",
|
|
"name": "start",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "LIMIT",
|
|
"name": "count",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "MATCH",
|
|
"name": "pattern",
|
|
"type": "pattern",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "WHERE",
|
|
"name": ["field","min","max"],
|
|
"type": ["string","double","double"],
|
|
"optional": true,
|
|
"multiple": true
|
|
},
|
|
{
|
|
"command": "NOFIELDS",
|
|
"name": [],
|
|
"type": [],
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "type",
|
|
"optional": true,
|
|
"enumargs": [
|
|
{
|
|
"name": "COUNT"
|
|
},
|
|
{
|
|
"name": "IDS"
|
|
},
|
|
{
|
|
"name": "OBJECTS"
|
|
},
|
|
{
|
|
"name": "POINTS"
|
|
},
|
|
{
|
|
"name": "BOUNDS"
|
|
},
|
|
{
|
|
"name": "HASHES",
|
|
"arguments": [
|
|
{
|
|
"name": "precision",
|
|
"type": "integer"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "search"
|
|
},
|
|
"NEARBY": {
|
|
"summary": "Searches for ids that are nearby a point",
|
|
"complexity": "O(log(N)) where N is the number of ids in the area",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"command": "CURSOR",
|
|
"name": "start",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "LIMIT",
|
|
"name": "count",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "SPARSE",
|
|
"name": "spread",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "MATCH",
|
|
"name": "pattern",
|
|
"type": "pattern",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "WHERE",
|
|
"name": ["field","min","max"],
|
|
"type": ["string","double","double"],
|
|
"optional": true,
|
|
"multiple": true
|
|
},
|
|
{
|
|
"command": "NOFIELDS",
|
|
"name": [],
|
|
"type": [],
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "FENCE",
|
|
"name": [],
|
|
"type": [],
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "type",
|
|
"optional": true,
|
|
"enumargs": [
|
|
{
|
|
"name": "COUNT"
|
|
},
|
|
{
|
|
"name": "IDS"
|
|
},
|
|
{
|
|
"name": "OBJECTS"
|
|
},
|
|
{
|
|
"name": "POINTS"
|
|
},
|
|
{
|
|
"name": "BOUNDS"
|
|
},
|
|
{
|
|
"name": "HASHES",
|
|
"arguments": [
|
|
{
|
|
"name": "precision",
|
|
"type": "integer"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"command": "POINT",
|
|
"name": ["lat","lon","meters"],
|
|
"type": ["double","double","double"]
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "search"
|
|
},
|
|
"WITHIN": {
|
|
"summary": "Searches for ids that are nearby a point",
|
|
"complexity": "O(log(N)) where N is the number of ids in the area",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"command": "CURSOR",
|
|
"name": "start",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "LIMIT",
|
|
"name": "count",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "SPARSE",
|
|
"name": "spread",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "MATCH",
|
|
"name": "pattern",
|
|
"type": "pattern",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "WHERE",
|
|
"name": ["field","min","max"],
|
|
"type": ["string","double","double"],
|
|
"optional": true,
|
|
"multiple": true
|
|
},
|
|
{
|
|
"command": "NOFIELDS",
|
|
"name": [],
|
|
"type": [],
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "FENCE",
|
|
"name": [],
|
|
"type": [],
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "type",
|
|
"optional": true,
|
|
"enumargs": [
|
|
{
|
|
"name": "COUNT"
|
|
},
|
|
{
|
|
"name": "IDS"
|
|
},
|
|
{
|
|
"name": "OBJECTS"
|
|
},
|
|
{
|
|
"name": "POINTS"
|
|
},
|
|
{
|
|
"name": "BOUNDS"
|
|
},
|
|
{
|
|
"name": "HASHES",
|
|
"arguments": [
|
|
{
|
|
"name": "precision",
|
|
"type": "integer"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "area",
|
|
"enumargs": [
|
|
{
|
|
"name": "GET",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "BOUNDS",
|
|
"arguments":[
|
|
{
|
|
"name": "minlat",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "minlon",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "maxlat",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "maxlon",
|
|
"type": "double"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "OBJECT",
|
|
"arguments":[
|
|
{
|
|
"name": "geojson",
|
|
"type": "geojson"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "TILE",
|
|
"arguments":[
|
|
{
|
|
"name": "x",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "y",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "z",
|
|
"type": "double"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "QUADKEY",
|
|
"arguments":[
|
|
{
|
|
"name": "quadkey",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "HASH",
|
|
"arguments": [
|
|
{
|
|
"name": "precision",
|
|
"type": "integer"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "search"
|
|
},
|
|
"INTERSECTS": {
|
|
"summary": "Searches for ids that are nearby a point",
|
|
"complexity": "O(log(N)) where N is the number of ids in the area",
|
|
"arguments":[
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"command": "CURSOR",
|
|
"name": "start",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "LIMIT",
|
|
"name": "count",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "SPARSE",
|
|
"name": "spread",
|
|
"type": "integer",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "MATCH",
|
|
"name": "pattern",
|
|
"type": "pattern",
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "WHERE",
|
|
"name": ["field","min","max"],
|
|
"type": ["string","double","double"],
|
|
"optional": true,
|
|
"multiple": true
|
|
},
|
|
{
|
|
"command": "NOFIELDS",
|
|
"name": [],
|
|
"type": [],
|
|
"optional": true
|
|
},
|
|
{
|
|
"command": "FENCE",
|
|
"name": [],
|
|
"type": [],
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "type",
|
|
"optional": true,
|
|
"enumargs": [
|
|
{
|
|
"name": "COUNT"
|
|
},
|
|
{
|
|
"name": "IDS"
|
|
},
|
|
{
|
|
"name": "OBJECTS"
|
|
},
|
|
{
|
|
"name": "POINTS"
|
|
},
|
|
{
|
|
"name": "BOUNDS"
|
|
},
|
|
{
|
|
"name": "HASHES",
|
|
"arguments": [
|
|
{
|
|
"name": "precision",
|
|
"type": "integer"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "area",
|
|
"enumargs": [
|
|
{
|
|
"name": "GET",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "BOUNDS",
|
|
"arguments":[
|
|
{
|
|
"name": "minlat",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "minlon",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "maxlat",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "maxlon",
|
|
"type": "double"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "OBJECT",
|
|
"arguments":[
|
|
{
|
|
"name": "geojson",
|
|
"type": "geojson"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "TILE",
|
|
"arguments":[
|
|
{
|
|
"name": "x",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "y",
|
|
"type": "double"
|
|
},
|
|
{
|
|
"name": "z",
|
|
"type": "double"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "QUADKEY",
|
|
"arguments":[
|
|
{
|
|
"name": "quadkey",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "HASH",
|
|
"arguments": [
|
|
{
|
|
"name": "precision",
|
|
"type": "integer"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "search"
|
|
},
|
|
"CONFIG GET": {
|
|
"summary": "Get the value of a configuration parameter",
|
|
"arguments":[
|
|
{
|
|
"name": "parameter",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"group": "server"
|
|
},
|
|
"CONFIG SET": {
|
|
"summary": "Set a configuration parameter to the given value",
|
|
"arguments":[
|
|
{
|
|
"name": "parameter",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "string",
|
|
"optional": true
|
|
}
|
|
],
|
|
"group": "server"
|
|
},
|
|
"CONFIG REWRITE": {
|
|
"summary": "Rewrite the configuration file with the in memory configuration",
|
|
"arguments":[],
|
|
"group": "server"
|
|
},
|
|
"SERVER": {
|
|
"summary":"Show server stats and details",
|
|
"complexity": "O(1)",
|
|
"arguments": [],
|
|
"since": "1.0.0",
|
|
"group": "server"
|
|
},
|
|
"GC": {
|
|
"summary":"Forces a garbage collection",
|
|
"complexity": "O(1)",
|
|
"arguments": [],
|
|
"since": "1.0.0",
|
|
"group": "server"
|
|
},
|
|
"READONLY": {
|
|
"summary": "Turns on or off readonly mode",
|
|
"complexity": "O(1)",
|
|
"arguments": [
|
|
{
|
|
"enum": ["yes","no"]
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "server"
|
|
},
|
|
"FLUSHDB": {
|
|
"summary":"Removes all keys",
|
|
"complexity": "O(1)",
|
|
"arguments": [],
|
|
"since": "1.0.0",
|
|
"group": "server"
|
|
},
|
|
"FOLLOW": {
|
|
"summary": "Follows a leader host",
|
|
"complexity": "O(1)",
|
|
"arguments": [
|
|
{
|
|
"name": "host",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "port",
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "replication"
|
|
},
|
|
"AOF": {
|
|
"summary": "Downloads the AOF start from pos and keeps the connection alive",
|
|
"complexity": "O(1)",
|
|
"arguments": [
|
|
{
|
|
"name": "pos",
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "replication"
|
|
},
|
|
"AOFMD5": {
|
|
"summary": "Performs a checksum on a portion of the aof",
|
|
"complexity": "O(1)",
|
|
"arguments": [
|
|
{
|
|
"name": "pos",
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"name": "sizs",
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"since": "1.0.0",
|
|
"group": "replication"
|
|
},
|
|
"AOFSHRINK": {
|
|
"summary": "Shrinks the aof in the background",
|
|
"group": "replication"
|
|
},
|
|
"PING": {
|
|
"summary": "Ping the server",
|
|
"group": "connection"
|
|
},
|
|
"QUIT": {
|
|
"summary": "Close the connection",
|
|
"group": "connection"
|
|
},
|
|
"AUTH": {
|
|
"summary": "Authenticate to the server",
|
|
"arguments": [
|
|
{
|
|
"name": "password",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"group": "connection"
|
|
}
|
|
} |