Module spin_sdk.wit.imports.fermyon_spin_key_value
Global variables
var Error-
The set of errors which may be raised by functions in this interface
Functions
def close(store: int) ‑> None-
Expand source code
def close(store: int) -> None: """ Close the specified `store`. This has no effect if `store` is not a valid handle to an open store. """ raise NotImplementedErrorClose the specified
store.This has no effect if
storeis not a valid handle to an open store. def delete(store: int, key: str) ‑> None-
Expand source code
def delete(store: int, key: str) -> None: """ Delete the tuple with the specified `key` from the specified `store`. `error::invalid-store` will be raised if `store` is not a valid handle to an open store. No error is raised if a tuple did not previously exist for `key`. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_key_value.Error)` """ raise NotImplementedErrorDelete the tuple with the specified
keyfrom the specifiedstore.error::invalid-storewill be raised ifstoreis not a valid handle to an open store. No error is raised if a tuple did not previously exist forkey.Raises:
componentize_py_types.Err(Error) def exists(store: int, key: str) ‑> bool-
Expand source code
def exists(store: int, key: str) -> bool: """ Return whether a tuple exists for the specified `key` in the specified `store`. `error::invalid-store` will be raised if `store` is not a valid handle to an open store. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_key_value.Error)` """ raise NotImplementedErrorReturn whether a tuple exists for the specified
keyin the specifiedstore.error::invalid-storewill be raised ifstoreis not a valid handle to an open store.Raises:
componentize_py_types.Err(Error) def get(store: int, key: str) ‑> bytes-
Expand source code
def get(store: int, key: str) -> bytes: """ Get the value associated with the specified `key` from the specified `store`. `error::invalid-store` will be raised if `store` is not a valid handle to an open store, and `error::no-such-key` will be raised if there is no tuple for `key` in `store`. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_key_value.Error)` """ raise NotImplementedErrorGet the value associated with the specified
keyfrom the specifiedstore.error::invalid-storewill be raised ifstoreis not a valid handle to an open store, anderror::no-such-keywill be raised if there is no tuple forkeyinstore.Raises:
componentize_py_types.Err(Error) def get_keys(store: int) ‑> List[str]-
Expand source code
def get_keys(store: int) -> List[str]: """ Return a list of all the keys in the specified `store`. `error::invalid-store` will be raised if `store` is not a valid handle to an open store. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_key_value.Error)` """ raise NotImplementedErrorReturn a list of all the keys in the specified
store.error::invalid-storewill be raised ifstoreis not a valid handle to an open store.Raises:
componentize_py_types.Err(Error) def open(name: str) ‑> int-
Expand source code
def open(name: str) -> int: """ Open the store with the specified name. If `name` is "default", the default store is opened. Otherwise, `name` must refer to a store defined and configured in a runtime configuration file supplied with the application. `error::no-such-store` will be raised if the `name` is not recognized. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_key_value.Error)` """ raise NotImplementedErrorOpen the store with the specified name.
If
nameis "default", the default store is opened. Otherwise,namemust refer to a store defined and configured in a runtime configuration file supplied with the application.error::no-such-storewill be raised if thenameis not recognized.Raises:
componentize_py_types.Err(Error) def set(store: int, key: str, value: bytes) ‑> None-
Expand source code
def set(store: int, key: str, value: bytes) -> None: """ Set the `value` associated with the specified `key` in the specified `store`, overwriting any existing value. `error::invalid-store` will be raised if `store` is not a valid handle to an open store. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_key_value.Error)` """ raise NotImplementedErrorSet the
valueassociated with the specifiedkeyin the specifiedstore, overwriting any existing value.error::invalid-storewill be raised ifstoreis not a valid handle to an open store.Raises:
componentize_py_types.Err(Error)
Classes
class Error_AccessDenied-
Expand source code
@dataclass class Error_AccessDenied: passError_AccessDenied()
class Error_InvalidStore-
Expand source code
@dataclass class Error_InvalidStore: passError_InvalidStore()
class Error_Io (value: str)-
Expand source code
@dataclass class Error_Io: value: strError_Io(value: str)
Instance variables
var value : str
class Error_NoSuchKey-
Expand source code
@dataclass class Error_NoSuchKey: passError_NoSuchKey()
class Error_NoSuchStore-
Expand source code
@dataclass class Error_NoSuchStore: passError_NoSuchStore()
class Error_StoreTableFull-
Expand source code
@dataclass class Error_StoreTableFull: passError_StoreTableFull()