|
|
@ -261,33 +261,38 @@ int RedisModule_CreateCommand(RedisModuleCtx *ctx, const char *name, RedisModule
|
|
|
|
be passed as a C string compoesd of space separated words, like for
|
|
|
|
be passed as a C string compoesd of space separated words, like for
|
|
|
|
example "write deny-oom". The set of flags are:
|
|
|
|
example "write deny-oom". The set of flags are:
|
|
|
|
|
|
|
|
|
|
|
|
* **"write"**: The command may modify the data set (it may also read from it).
|
|
|
|
* **"write"**: The command may modify the data set (it may also read
|
|
|
|
|
|
|
|
from it).
|
|
|
|
* **"readonly"**: The command returns data from keys but never writes.
|
|
|
|
* **"readonly"**: The command returns data from keys but never writes.
|
|
|
|
* **"admin"**: The command is an administrative command (may change replication
|
|
|
|
* **"admin"**: The command is an administrative command (may change
|
|
|
|
or perform similar tasks).
|
|
|
|
replication or perform similar tasks).
|
|
|
|
* **"deny-oom"**: The command may use additional memory and should be denied during
|
|
|
|
* **"deny-oom"**: The command may use additional memory and should be
|
|
|
|
out of memory conditions.
|
|
|
|
denied during out of memory conditions.
|
|
|
|
* **"deny-script"**: Don't allow this command in Lua scripts.
|
|
|
|
* **"deny-script"**: Don't allow this command in Lua scripts.
|
|
|
|
* **"allow-loading"**: Allow this command while the server is loading data. Only
|
|
|
|
* **"allow-loading"**: Allow this command while the server is loading data.
|
|
|
|
commands not interacting with the data set should be allowed
|
|
|
|
Only commands not interacting with the data set
|
|
|
|
to run in this mode. If not sure don't use this flag.
|
|
|
|
should be allowed to run in this mode. If not sure
|
|
|
|
|
|
|
|
don't use this flag.
|
|
|
|
* **"pubsub"**: The command publishes things on Pub/Sub channels.
|
|
|
|
* **"pubsub"**: The command publishes things on Pub/Sub channels.
|
|
|
|
* **"random"**: The command may have different outputs even starting from the
|
|
|
|
* **"random"**: The command may have different outputs even starting
|
|
|
|
same input arguments and key values.
|
|
|
|
from the same input arguments and key values.
|
|
|
|
* **"allow-stale"**: The command is allowed to run on slaves that don't serve stale
|
|
|
|
* **"allow-stale"**: The command is allowed to run on slaves that don't
|
|
|
|
data. Don't use if you don't know what this means.
|
|
|
|
serve stale data. Don't use if you don't know what
|
|
|
|
* **"no-monitor"**: Don't propoagate the command on monitor. Use this if the command
|
|
|
|
this means.
|
|
|
|
has sensible data among the arguments.
|
|
|
|
* **"no-monitor"**: Don't propoagate the command on monitor. Use this if
|
|
|
|
* **"fast"**: The command time complexity is not greater than O(log(N)) where
|
|
|
|
the command has sensible data among the arguments.
|
|
|
|
N is the size of the collection or anything else representing
|
|
|
|
* **"fast"**: The command time complexity is not greater
|
|
|
|
the normal scalability issue with the command.
|
|
|
|
than O(log(N)) where N is the size of the collection or
|
|
|
|
* **"getkeys-api"**: The command implements the interface to return the arguments
|
|
|
|
anything else representing the normal scalability
|
|
|
|
that are keys. Used when start/stop/step is not enough because
|
|
|
|
issue with the command.
|
|
|
|
of the command syntax.
|
|
|
|
* **"getkeys-api"**: The command implements the interface to return
|
|
|
|
* **"no-cluster"**: The command should not register in Redis Cluster since is not
|
|
|
|
the arguments that are keys. Used when start/stop/step
|
|
|
|
designed to work with it because, for example, is unable to
|
|
|
|
is not enough because of the command syntax.
|
|
|
|
report the position of the keys, programmatically creates key
|
|
|
|
* **"no-cluster"**: The command should not register in Redis Cluster
|
|
|
|
names, or any other reason.
|
|
|
|
since is not designed to work with it because, for
|
|
|
|
|
|
|
|
example, is unable to report the position of the
|
|
|
|
|
|
|
|
keys, programmatically creates key names, or any
|
|
|
|
|
|
|
|
other reason.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### RedisModule_SetModuleAttribs
|
|
|
|
### RedisModule_SetModuleAttribs
|
|
|
@ -1226,7 +1231,7 @@ void RMUtil_StringToUpper(RedisModuleString *s);
|
|
|
|
|
|
|
|
|
|
|
|
### Vector_Get
|
|
|
|
### Vector_Get
|
|
|
|
```
|
|
|
|
```
|
|
|
|
int Vector_Get(Vector *v, int pos, void *ptr);
|
|
|
|
int Vector_Get(Vector *v, size_t pos, void *ptr);
|
|
|
|
```
|
|
|
|
```
|
|
|
|
get the element at index pos. The value is copied in to ptr. If pos is outside
|
|
|
|
get the element at index pos. The value is copied in to ptr. If pos is outside
|
|
|
|
the vector capacity, we return 0
|
|
|
|
the vector capacity, we return 0
|
|
|
@ -1235,7 +1240,7 @@ int Vector_Get(Vector *v, int pos, void *ptr);
|
|
|
|
|
|
|
|
|
|
|
|
### Vector_Resize
|
|
|
|
### Vector_Resize
|
|
|
|
```
|
|
|
|
```
|
|
|
|
int Vector_Resize(Vector *v, int newcap);
|
|
|
|
int Vector_Resize(Vector *v, size_t newcap);
|
|
|
|
```
|
|
|
|
```
|
|
|
|
resize capacity of v
|
|
|
|
resize capacity of v
|
|
|
|
|
|
|
|
|
|
|
|