Skip to main content

API Reference

Resources

Redis

A cloud redis db.

Initializers

bring ex;

new ex.Redis();
NameTypeDescription

Methods

Inflight Methods
NameDescription
del
Removes the specified key.
get
Get value at given key.
hget
Returns the value associated with field in the hash stored at key.
hset
Sets the specified field to respective value in the hash stored at key.
sadd
Add the specified members to the set stored at key.
set
Set key value pair.
smembers
Returns all the members of the set value stored at key.
url
Get url of redis server.

del
inflight del(key: str): num

Removes the specified key.

keyRequired
  • Type: str

the key.


get
inflight get(key: str): str?

Get value at given key.

keyRequired
  • Type: str

the key to get.


hget
inflight hget(key: str, field: str): str?

Returns the value associated with field in the hash stored at key.

keyRequired
  • Type: str

the key.


fieldRequired
  • Type: str

the field at given key.


hset
inflight hset(key: str, field: str, value: str): num

Sets the specified field to respective value in the hash stored at key.

keyRequired
  • Type: str

key to set.


fieldRequired
  • Type: str

field in key to set.


valueRequired
  • Type: str

value to set at field in key.


sadd
inflight sadd(key: str, value: str): num

Add the specified members to the set stored at key.

keyRequired
  • Type: str

the key.


valueRequired
  • Type: str

the value to add to the set at given key.


set
inflight set(key: str, value: str): void

Set key value pair.

keyRequired
  • Type: str

the key to set.


valueRequired
  • Type: str

the value to store at given key.


smembers
inflight smembers(key: str): MutArray<str>

Returns all the members of the set value stored at key.

keyRequired
  • Type: str

the key.


url
inflight url(): str

Get url of redis server.

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.

onLiftType
bring ex;

ex.Redis.onLiftType(host: IInflightHost, ops: MutArray<str>);

A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.

The list of requested inflight methods needed by the inflight host are given by ops.

This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.

hostRequired

opsRequired
  • Type: MutArray<str>

toInflight
bring ex;

ex.Redis.toInflight(obj: IResource);

Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.

NOTE: This statement must be executed within an async context.

objRequired

Properties

NameTypeDescription
node
constructs.NodeThe tree node.

nodeRequired
node: Node;
  • Type: constructs.Node

The tree node.


Classes

RedisClientBase

Base class for Redis Client.

Initializers

bring ex;

new ex.RedisClientBase();
NameTypeDescription

Methods

NameDescription
del
Removes the specified key.
get
Get value at given key.
hget
Returns the value associated with field in the hash stored at key.
hset
Sets the specified field to respective value in the hash stored at key.
sadd
Add the specified members to the set stored at key.
set
Set key value pair.
smembers
Returns all the members of the set value stored at key.
url
Get url of redis server.

del
del(key: str): num

Removes the specified key.

keyRequired
  • Type: str

get
get(key: str): str?

Get value at given key.

keyRequired
  • Type: str

hget
hget(key: str, field: str): str?

Returns the value associated with field in the hash stored at key.

keyRequired
  • Type: str

fieldRequired
  • Type: str

hset
hset(key: str, field: str, value: str): num

Sets the specified field to respective value in the hash stored at key.

keyRequired
  • Type: str

fieldRequired
  • Type: str

valueRequired
  • Type: str

sadd
sadd(key: str, value: str): num

Add the specified members to the set stored at key.

keyRequired
  • Type: str

valueRequired
  • Type: str

set
set(key: str, value: str): void

Set key value pair.

keyRequired
  • Type: str

valueRequired
  • Type: str

smembers
smembers(key: str): MutArray<str>

Returns all the members of the set value stored at key.

keyRequired
  • Type: str

url
url(): str

Get url of redis server.