Expand description
Defines sys calls to interact with SpacetimeDB. This forms an ABI of sorts that modules written in Rust can use.
Modules§
- raw
- Provides a raw set of sys calls which abstractions can be built atop of.
Structs§
Enums§
- LogLevel
- A log level that can be used in
console_log. The variants are convertible into a rawu8log level.
Functions§
- console_
log - Log at
levelatextmessage occurring infilename:line_numberwithtargetbeing the module path at thelog!invocation site. - datastore_
delete_ all_ by_ eq_ bsatn - Deletes those rows, in the table identified by
table_id, that match any row in the byte stringrelation. - datastore_
delete_ by_ index_ scan_ point_ bsatn - Deletes all rows found in the index identified by
index_id, according to the `point. - datastore_
delete_ by_ index_ scan_ range_ bsatn - Deletes all rows found in the index identified by
index_id, according to theprefix,rstart, andrend. - datastore_
index_ scan_ point_ bsatn - Finds all rows in the index identified by
index_id, according to the `point. - datastore_
index_ scan_ range_ bsatn - Finds all rows in the index identified by
index_id, according to theprefix,rstart, andrend. - datastore_
insert_ bsatn - Inserts a row into the table identified by
table_id, where the row is a BSATN-encodedProductValuematching the table’sProductTyperow-schema. - datastore_
table_ row_ count - Returns the number of rows currently in table identified by
table_id. - datastore_
table_ scan_ bsatn - Starts iteration on each row, as BSATN-encoded, of a table identified by
table_id. Returns iterator handle is written to theoutpointer. This handle can be advanced byRowIter::read. - datastore_
update_ bsatn - Updates a row into the table identified by
table_id, where the row is a BSATN-encodedProductValuematching the table’sProductTyperow-schema. - get_jwt
- Finds the JWT payload associated with
connection_id. If nothing is found for the connection, this returns None. If a payload is found, this will return a validraw::BytesSource. - identity
- Read the current module’s identity, as a little-endian byte array.
- index_
id_ from_ name - Queries the
index_idassociated with the given (index)name. - table_
id_ from_ name - Queries the
table_idassociated with the given (table)name.