KeyValueStoreBackend
Index
Methods
deleteValue
Delete a record by key.
Parameters
key: string
Returns Promise<void>
drop
Remove the key-value store and all its data.
Returns Promise<void>
getMetadata
Returns metadata about the key-value store (id, name, timestamps, etc.).
Implementations should throw if the underlying storage no longer exists (e.g. it was deleted externally). This method should never return stale data for a storage that has been removed.
Returns Promise<KeyValueStoreInfo>
getPublicUrl
Get the public URL for a record, or
undefinedif unavailable.Parameters
key: string
Returns Promise<undefined | string>
getValue
Get a record by key. Returns the raw bytes plus content type, or
undefinedif not found.Clients are byte transports and must not parse the body — the
KeyValueStorefrontend interprets it according to the content type.Parameters
key: string
Returns Promise<undefined | KeyValueStoreRecord>
listKeys
List a single page of keys in the store. Returns at most
limitkeys starting afterexclusiveStartKey, wrapped in a self-describing page.Like DatasetBackend.getData, this returns one page rather than the whole collection; assembling all pages (e.g. for
KeyValueStore.keys()) is the frontend's job. The result carries a cursor (isTruncated/nextExclusiveStartKey) so the frontend can paginate deterministically instead of inferring the end fromitems.length < limit.Parameters
optionaloptions: KeyValueStoreListKeysOptions
Returns Promise<KeyValueStoreListKeysResult>
purge
Remove all records from the store but keep the store itself.
Returns Promise<void>
recordExists
Check whether a record with the given key exists.
Parameters
key: string
Returns Promise<boolean>
setValue
Set a record value.
Parameters
record: KeyValueStoreInputRecord
Returns Promise<void>
Key-value Store client.