mirror of https://github.com/tidwall/tile38.git
updated command syntax
This commit is contained in:
parent
857f8cb155
commit
8faeceac8e
|
@ -65,7 +65,7 @@ $ ./tile38-cli
|
|||
> scan fleet # returns both trucks in 'fleet'
|
||||
> nearby fleet point 33.462 -112.268 6000 # search 6 kilometers around a point. returns one truck.
|
||||
|
||||
# crud operations
|
||||
# key value operations
|
||||
> get fleet truck1 # returns 'truck1'
|
||||
> del fleet truck2 # deletes 'truck2'
|
||||
> drop fleet # removes all
|
||||
|
@ -272,7 +272,7 @@ Currently we have only one native client written in Go. Though is should be triv
|
|||
## Commands
|
||||
This is the full list of commands available to Tile38.
|
||||
|
||||
#### Crud
|
||||
#### Keys
|
||||
```md
|
||||
GET key id [OBJECT|POINT|BOUNDS|(HASH precision)]
|
||||
summary: Get the object of an id
|
||||
|
|
|
@ -45,7 +45,14 @@ var (
|
|||
)
|
||||
|
||||
func showHelp() bool {
|
||||
fmt.Fprintf(os.Stdout, "tile38-cli %s (git:%s)\n\n", core.Version, core.GitSHA)
|
||||
|
||||
gitsha := ""
|
||||
if core.GitSHA == "" || core.GitSHA == "0000000" {
|
||||
gitsha = ""
|
||||
} else {
|
||||
gitsha = " (git:" + core.GitSHA + ")"
|
||||
}
|
||||
fmt.Fprintf(os.Stdout, "tile38-cli %s%s\n\n", core.Version, gitsha)
|
||||
fmt.Fprintf(os.Stdout, "Usage: tile38-cli [OPTIONS] [cmd [arg [arg ...]]]\n")
|
||||
fmt.Fprintf(os.Stdout, " -h <hostname> Server hostname (default: %s).\n", hostname)
|
||||
fmt.Fprintf(os.Stdout, " -p <port> Server port (default: %d).\n", port)
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"FSET": {
|
||||
"summary": "Set the value for a single field of an id",
|
||||
|
@ -106,7 +106,7 @@
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"GET": {
|
||||
"summary": "Get the object of an id",
|
||||
|
@ -137,8 +137,8 @@
|
|||
"name": "HASH",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "precision",
|
||||
"type": "integer"
|
||||
"name": "geohash",
|
||||
"type": "geohash"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -146,7 +146,7 @@
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"DEL": {
|
||||
"summary": "Delete an id from a key",
|
||||
|
@ -162,7 +162,7 @@
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"DROP": {
|
||||
"summary": "Remove a key from the database",
|
||||
|
@ -174,7 +174,7 @@
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"KEYS": {
|
||||
"summary": "Finds all keys matching the given pattern",
|
||||
|
@ -186,7 +186,7 @@
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"STATS": {
|
||||
"summary": "Show stats for one or more keys",
|
||||
|
@ -199,7 +199,7 @@
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
|
||||
"SCAN": {
|
||||
|
@ -522,8 +522,8 @@
|
|||
"name": "HASH",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "precision",
|
||||
"type": "integer"
|
||||
"name": "geohash",
|
||||
"type": "geohash"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -690,8 +690,8 @@
|
|||
"name": "HASH",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "precision",
|
||||
"type": "integer"
|
||||
"name": "geohash",
|
||||
"type": "geohash"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -780,7 +780,7 @@
|
|||
"group": "replication"
|
||||
},
|
||||
"AOF": {
|
||||
"summary": "Downloads the AOF start from pos and keeps the connection alive",
|
||||
"summary": "Downloads the AOF starting from pos and keeps the connection alive",
|
||||
"complexity": "O(1)",
|
||||
"arguments": [
|
||||
{
|
||||
|
|
|
@ -235,7 +235,7 @@ var commandsJSON = `{
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"FSET": {
|
||||
"summary": "Set the value for a single field of an id",
|
||||
|
@ -259,7 +259,7 @@ var commandsJSON = `{
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"GET": {
|
||||
"summary": "Get the object of an id",
|
||||
|
@ -290,8 +290,8 @@ var commandsJSON = `{
|
|||
"name": "HASH",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "precision",
|
||||
"type": "integer"
|
||||
"name": "geohash",
|
||||
"type": "geohash"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ var commandsJSON = `{
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"DEL": {
|
||||
"summary": "Delete an id from a key",
|
||||
|
@ -315,7 +315,7 @@ var commandsJSON = `{
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"DROP": {
|
||||
"summary": "Remove a key from the database",
|
||||
|
@ -327,7 +327,7 @@ var commandsJSON = `{
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"KEYS": {
|
||||
"summary": "Finds all keys matching the given pattern",
|
||||
|
@ -339,7 +339,7 @@ var commandsJSON = `{
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
"STATS": {
|
||||
"summary": "Show stats for one or more keys",
|
||||
|
@ -352,7 +352,7 @@ var commandsJSON = `{
|
|||
}
|
||||
],
|
||||
"since": "1.0.0",
|
||||
"group": "crud"
|
||||
"group": "keys"
|
||||
},
|
||||
|
||||
"SCAN": {
|
||||
|
@ -675,8 +675,8 @@ var commandsJSON = `{
|
|||
"name": "HASH",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "precision",
|
||||
"type": "integer"
|
||||
"name": "geohash",
|
||||
"type": "geohash"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -843,8 +843,8 @@ var commandsJSON = `{
|
|||
"name": "HASH",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "precision",
|
||||
"type": "integer"
|
||||
"name": "geohash",
|
||||
"type": "geohash"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -933,7 +933,7 @@ var commandsJSON = `{
|
|||
"group": "replication"
|
||||
},
|
||||
"AOF": {
|
||||
"summary": "Downloads the AOF start from pos and keeps the connection alive",
|
||||
"summary": "Downloads the AOF starting from pos and keeps the connection alive",
|
||||
"complexity": "O(1)",
|
||||
"arguments": [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue