PurgeableKeyValueStoreBackend
Hierarchy
- KeyValueStoreBackend
- PurgeableKeyValueStoreBackend
Index
Methods
inheriteddeleteValue
Delete a record by key.
Parameters
key: string
Returns Promise<void>
inheriteddrop
Remove the key-value store and all its data.
Returns Promise<void>
inheritedgetMetadata
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>
inheritedgetPublicUrl
Get the public URL a record with this key has, or
undefinedif the backend exposes no public URLs at all.The URL is derived from the key; implementations MUST NOT check that the record exists. Callers legitimately ask for the URL of a record that is not on the backend yet — most notably one buffered in an uncommitted storage transaction — and existence is
recordExists's job.Parameters
key: string
Returns Promise<undefined | string>
inheritedgetValue
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>
inheritedlistKeys
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>
inheritedpurge
Remove all records from the store but keep the store itself.
Returns Promise<void>
purgeExcept
Remove every record from the store except the given keys.
Parameters
keys: string[]
Returns Promise<void>
inheritedrecordExists
Check whether a record with the given key exists.
Parameters
key: string
Returns Promise<boolean>
inheritedsetValue
Set a record value.
Parameters
record: KeyValueStoreInputRecord
Returns Promise<void>
A file-system key-value store backend as seen by FileSystemStorageBackend.purgeKeyValueStore.