Page Contents

Home > @loopback/repository > KVConnector > set

KVConnector.set() method

Set an entry with key/value

Signature:

set(modelClass: Class<Entity>, key: string, value: EntityData, options?: Options): Promise<boolean>;

Parameters

Parameter Type Description
modelClass Class<Entity> Model class
key string Key for the entry
value EntityData Value for the entry
options Options Options for the operation

Returns:

Promise<boolean>

Promise if an entry is set for the key, otherwise Promise