Skip to main content

Database functions

Database functions are used to perform database-related tasks, such as creating new tables, reading data from existing tables, or updating table records. For an introduction to creating database schemas and tables and using database functions, see Database model.

FunctionDescription
create‑tableCreate a table identified by the specified table name.
describe‑keysetRetrieve metadata for a specified keyset.
describe‑moduleRetrieve metadata for a specified module.
describe‑tableRetrieve metadata for a specified table.
fold-dbSelect rows from a specified table and iterate over them using a specified consumer function.
insertWrite a new entry in a specified table for a given key of object data.
list-modulesList all of the modules deployed on a particular chain.
readRetrieve a row from a specified table by its key row.
selectRetrieve full rows or specified columns from a table.
updateUpdate the specified {column:value} object in the specified table for a given key row
with-default-readRead columns from a default object with matching key names if the specified key row isn't found.
with-readRead a row from a specified table for a given key row and bind column names to variables.
writeWrite the specified {column:value} object in the specified table for a given key row.