Craft Key-Value Store
const { kvs } = MODULES;Table of Contents
Section titled “Table of Contents”Schemas
Section titled “Schemas”KeyValueStoreValue
Section titled “KeyValueStoreValue”Type: Object
Properties
Section titled “Properties”KeyValueStoreRet
Section titled “KeyValueStoreRet”Type: Object<string, KeyValueStoreValue>
Methods
Section titled “Methods”Craft Key-Value Store から値を取得する
Parameters
Section titled “Parameters”-
paramobject
Returns Promise<KeyValueStoreRet> 単一の場合は{key: value}、複数の場合は各 key の結果(存在しないキーは null)
Craft Key-Value Store から複数の値を取得する
Parameters
Section titled “Parameters”-
paramobject (optional, default{startKey:null,stopKey:null,startCursor:null,pageSize:10})
Returns Promise<{item: KeyValueStoreRet, endCursor: string, isMoreResults: boolean}>
Craft Key-Value Store に値を書き込む
Parameters
Section titled “Parameters”-
paramobject
Returns Promise<object> empty object
checkAndWrite
Section titled “checkAndWrite”Craft Key-Value Store にチェックに合致した値を書き込む
Parameters
Section titled “Parameters”-
paramobject
Returns Promise<object> empty object
delete
Section titled “delete”Craft Key-Value Store から値を削除する