UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

40 lines (26 loc) 1.26 kB
--- lang: en title: 'API docs: repository.kvconnector.set' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository permalink: /doc/en/lb4/apidocs.repository.kvconnector.set.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [KVConnector](./repository.kvconnector.md) &gt; [set](./repository.kvconnector.set.md) ## KVConnector.set() method Set an entry with key/value <b>Signature:</b> ```typescript set(modelClass: Class<Entity>, key: string, value: EntityData, options?: Options): Promise<boolean>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | modelClass | [Class](./repository.class.md)<!-- -->&lt;[Entity](./repository.entity.md)<!-- -->&gt; | Model class | | key | string | Key for the entry | | value | [EntityData](./repository.entitydata.md) | Value for the entry | | options | [Options](./repository.options.md) | Options for the operation | <b>Returns:</b> Promise&lt;boolean&gt; Promise<true> if an entry is set for the key, otherwise Promise<false>