View Source Comtile38 (Comtile38 v0.0.1)
Entry point module of the library with all Tile38 commands functions.
The functions defined here are loaded in compile time from the
Tile38 commands documentation
The only exceptions are commands/0
, command_group/1
and command_groups/0
that provide a way to look for the desired commands.
Because you don't need to remember all of them by heart
Link to this section Summary
Functions
Downloads the AOF starting from pos and keeps the connection alive
Performs a checksum on a portion of the aof
Shrinks the aof in the background
Authenticate to the server
Get the combined bounds of all the objects in a key
Finds all channels matching a pattern
Returns the commands in the given command group.
Returns the names of the command groups provided by Redis.
Returns the list of all available commands.
Get the value of a configuration parameter
Rewrite the configuration file with the in memory configuration
Set a configuration parameter to the given value
Delete an id from a key
Removes a channel
Removes a webhook
Remove a key from the database
Evaluates a Lua script
Evaluates a Lua script in a non-atomic fashion
Evaluates, in a non-atomic fashion, a Lua script cached on the server by its SHA1 digest
Evaluates a read-only Lua script
Evaluates a read-only Lua script cached on the server by its SHA1 digest
Evaluates a Lua script cached on the server by its SHA1 digest
Set a timeout on an id
Removes all keys
Follows a leader host
Set the value for one or more fields of an id
Forces a garbage collection
Get the object of an id
Finds all hooks matching a pattern
Searches for ids that intersect an area
Delete a value from a JSON document
Get a value from a JSON document
Set a value in a JSON document
Finds all keys matching the given pattern
Searches for ids that are nearby a point
Gets or sets the output format for the current connection.
Removes all objects matching a pattern
Removes all channels matching a pattern
Removes all hooks matching a pattern
Remove the existing timeout on an id
Ping the server
Subscribes the client to the given patterns
Close the connection
Turns on or off readonly mode
Rename a key to be stored under a different name.
Rename a key to be stored under a different name, if a new key does not exist.
Incrementally iterate though a key
Returns information about the existence of the scripts in server cache
Flushes the server cache of Lua scripts
Loads the compiled version of a script into the server cache, without executing
Search for string values in a key
Show server stats and details
Sets the value of an id
Creates a pubsub channel which points to geofenced search
Creates a webhook which points to geofenced search
Show stats for one or more keys
Subscribe to a geofence channel
Performs spatial test
Runs the following command with the timeout
Get a timeout on an id
Searches for ids that completely within the area
Link to this section Functions
Downloads the AOF starting from pos and keeps the connection alive
Group: replication
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
pos
integer
Performs a checksum on a portion of the aof
Group: replication
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
pos
integersize
integer
Shrinks the aof in the background
Group: replication
Authenticate to the server
Group: connection
Arguments:
password
string
Get the combined bounds of all the objects in a key
Group: keys
Available since version 1.3.0.
Time complexity: O(1)
Arguments:
key
string
Finds all channels matching a pattern
Group: pubsub
Arguments:
pattern
Returns the commands in the given command group.
@spec command_groups() :: [atom()]
Returns the names of the command groups provided by Redis.
@spec commands() :: [atom()]
Returns the list of all available commands.
Get the value of a configuration parameter
Group: server
Arguments:
parameter
string
Rewrite the configuration file with the in memory configuration
Group: server
Set a configuration parameter to the given value
Group: server
Arguments:
parameter
stringvalue
optional, string
Delete an id from a key
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
stringid
stringerron404
optional
Removes a channel
Group: pubsub
Arguments:
name
string
Removes a webhook
Group: webhook
Arguments:
name
string
Remove a key from the database
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
string
Evaluates a Lua script
Group: scripting
Available since version 1.10.0.
Time complexity: Depends on the evaluated script
Arguments:
script
stringnumkeys
integerkey
optional, multiple, stringarg
optional, multiple, string
Evaluates a Lua script in a non-atomic fashion
Group: scripting
Available since version 1.10.0.
Time complexity: Depends on the evaluated script
Arguments:
script
stringnumkeys
integerkey
optional, multiple, stringarg
optional, multiple, string
Evaluates, in a non-atomic fashion, a Lua script cached on the server by its SHA1 digest
Group: scripting
Available since version 1.10.0.
Time complexity: Depends on the evaluated script
Arguments:
sha1
stringnumkeys
integerkey
optional, multiple, stringarg
optional, multiple, string
Evaluates a read-only Lua script
Group: scripting
Available since version 1.10.0.
Time complexity: Depends on the evaluated script
Arguments:
script
stringnumkeys
integerkey
optional, multiple, stringarg
optional, multiple, string
Evaluates a read-only Lua script cached on the server by its SHA1 digest
Group: scripting
Available since version 1.10.0.
Time complexity: Depends on the evaluated script
Arguments:
script
stringnumkeys
integerkey
optional, multiple, stringarg
optional, multiple, string
Evaluates a Lua script cached on the server by its SHA1 digest
Group: scripting
Available since version 1.10.0.
Time complexity: Depends on the evaluated script
Arguments:
sha1
stringnumkeys
integerkey
optional, multiple, stringarg
optional, multiple, string
Set a timeout on an id
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
stringid
stringseconds
double
Removes all keys
Group: server
Available since version 1.0.0.
Time complexity: O(1)
Follows a leader host
Group: replication
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
host
stringport
integer
Set the value for one or more fields of an id
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
stringid
stringxx
optionalfield_value
[string, double]field_value
optional, multiple, [string, double]
Forces a garbage collection
Group: server
Available since version 1.0.0.
Time complexity: O(1)
Get the object of an id
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
stringid
stringwithfields
optionaltype
optional
Finds all hooks matching a pattern
Group: webhook
Arguments:
pattern
Searches for ids that intersect an area
Group: search
Available since version 1.0.0.
Time complexity: O(log(N)) where N is the number of ids in the area
Arguments:
key
stringcursor
optional, integerlimit
optional, integermatch
optionalwhere
optional, multiple, [string, double, double]wherein
optional, multiple, [string, integer, double]whereeval
optional, multiple, [string, integer, string]whereevalsha
optional, multiple, [string, integer, string]clip
optionalnofields
optionalfence
optionaldetect
optional, [string]commands
optional, [string]type
optionalarea
Delete a value from a JSON document
Group: keys
Time complexity: O(1)
Arguments:
key
stringid
stringpath
string
Get a value from a JSON document
Group: keys
Time complexity: O(1)
Arguments:
key
stringid
stringpath
stringraw
optional
Set a value in a JSON document
Group: keys
Time complexity: O(1)
Arguments:
key
stringid
stringpath
stringvalue
string`` optional
Finds all keys matching the given pattern
Group: keys
Available since version 1.0.0.
Time complexity: O(N) where N is the number of keys in the database
Arguments:
pattern
Searches for ids that are nearby a point
Group: search
Available since version 1.0.0.
Time complexity: O(log(N)) where N is the number of ids in the area
Arguments:
key
stringcursor
optional, integerlimit
optional, integermatch
optionaldistance
optionalwhere
optional, multiple, [string, double, double]wherein
optional, multiple, [string, integer, double]whereeval
optional, multiple, [string, integer, string]whereevalsha
optional, multiple, [string, integer, string]nofields
optionalfence
optionaldetect
optional, [string]commands
optional, [string]type
optionalarea
Gets or sets the output format for the current connection.
Group: connection
Arguments:
format
optional
Removes all objects matching a pattern
Group: keys
Arguments:
key
stringpattern
Removes all channels matching a pattern
Group: pubsub
Arguments:
pattern
Removes all hooks matching a pattern
Group: webhook
Arguments:
pattern
Remove the existing timeout on an id
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
stringid
string
Ping the server
Group: connection
Subscribes the client to the given patterns
Group: pubsub
Arguments:
pattern
Close the connection
Group: connection
Turns on or off readonly mode
Group: server
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
- `` ["yes", "no"]
Rename a key to be stored under a different name.
Group: keys
Available since version 1.14.5.
Time complexity: O(1)
Arguments:
key
stringnewkey
string
Rename a key to be stored under a different name, if a new key does not exist.
Group: keys
Available since version 1.14.5.
Time complexity: O(1)
Arguments:
key
stringnewkey
string
Incrementally iterate though a key
Group: search
Available since version 1.0.0.
Time complexity: O(N) where N is the number of ids in the key
Arguments:
key
stringcursor
optional, integerlimit
optional, integermatch
optionalorder
optionalwhere
optional, multiple, [string, double, double]wherein
optional, multiple, [string, integer, double]whereeval
optional, multiple, [string, integer, string]whereevalsha
optional, multiple, [string, integer, string]nofields
optionaltype
optional
Returns information about the existence of the scripts in server cache
Group: scripting
Available since version 1.10.0.
Time complexity: O(N) where N is the number of provided sha1 arguments
Arguments:
sha1
multiple, string
Flushes the server cache of Lua scripts
Group: scripting
Available since version 1.10.0.
Time complexity: O(1)
Loads the compiled version of a script into the server cache, without executing
Group: scripting
Available since version 1.10.0.
Time complexity: O(N) where N is the number of bytes in the script
Arguments:
script
string
Search for string values in a key
Group: search
Available since version 1.4.2.
Time complexity: O(N) where N is the number of values in the key
Arguments:
key
stringcursor
optional, integerlimit
optional, integermatch
optionalorder
optionalwhere
optional, multiple, [string, double, double]wherein
optional, multiple, [string, integer, double]whereeval
optional, multiple, [string, integer, string]whereevalsha
optional, multiple, [string, integer, string]nofields
optionaltype
optional
Show server stats and details
Group: server
Available since version 1.0.0.
Time complexity: O(1)
Sets the value of an id
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
stringid
stringfield
optional, multiple, [string, double]ex
optional, [double]type
optionalvalue
Creates a pubsub channel which points to geofenced search
Group: pubsub
Arguments:
name
stringmeta
optional, multiple, [string, string]ex
optional, [double]` ["NEARBY", "WITHIN", "INTERSECTS"] *
keystring *
fence*
detectoptional, [string] *
commandsoptional, [string] *
param` string
Creates a webhook which points to geofenced search
Group: webhook
Arguments:
name
stringendpoint
stringmeta
optional, multiple, [string, string]ex
optional, [double]` ["NEARBY", "WITHIN", "INTERSECTS"] *
keystring *
fence*
detectoptional, [string] *
commandsoptional, [string] *
param` string
Show stats for one or more keys
Group: keys
Available since version 1.0.0.
Time complexity: O(N) where N is the number of keys being requested
Arguments:
key
string
Subscribe to a geofence channel
Group: pubsub
Arguments:
channel
string
Performs spatial test
Group: tests
Available since version 1.16.0.
Time complexity: One test per command, complexity depends on the test
Arguments:
area1
test
clip
optionalarea2
Runs the following command with the timeout
Group: connection
Arguments:
seconds
doublecommand
stringarg
optional, multiple, string
Get a timeout on an id
Group: keys
Available since version 1.0.0.
Time complexity: O(1)
Arguments:
key
stringid
string
Searches for ids that completely within the area
Group: search
Available since version 1.0.0.
Time complexity: O(log(N)) where N is the number of ids in the area
Arguments:
key
stringcursor
optional, integerlimit
optional, integermatch
optionalwhere
optional, multiple, [string, double, double]wherein
optional, multiple, [string, integer, double]whereeval
optional, multiple, [string, integer, string]whereevalsha
optional, multiple, [string, integer, string]nofields
optionalfence
optionaldetect
optional, [string]commands
optional, [string]type
optionalarea