storage
INFO
Сам справочник на английском: он создаётся автоматически из WIT-файлов.
A small per-mod, per-world key-value store. It never touches the vanilla world save. Limits: keys 1-256 bytes of UTF-8, values up to 1 MiB, 64 MiB per mod per world. Writes are durable after the next world-save post phase (hosts may flush sooner).
Package blockheads:api@0.3.1 · Lua table bh.storage · WIT source
Uses: types.{api-error}
Functions
get function
txt
get: func(key: string) -> option<list<u8>>;Reads a value.
set function
txt
set: func(key: string, value: list<u8>) -> result<_, api-error>;Writes a value, replacing any old one.
delete function
txt
delete: func(key: string) -> bool;Deletes a value. Returns false if the key did not exist.
keys function
txt
keys: func(prefix: string) -> list<string>;Lists keys starting with prefix in byte order ("" lists all keys).