Module db

Source
Expand description

Database functions

Functionsยง

db_contains_key
Everyone can call this. Checks if a key is contained in the key-value store.
db_contains_key_ ๐Ÿ”’ โš 
db_del
Only update() can call this. Removes a key from the db.
db_del_ ๐Ÿ”’ โš 
db_get
Everyone can call this. Will read a key from the key-value store.
db_get_ ๐Ÿ”’ โš 
db_init
Create a new database instance for the given contract. This should be called in the init_contract() section to create any databases that the contract might need or use.
db_init_ ๐Ÿ”’ โš 
db_lookup
Everyone can call this. Assumes that the database already went through db_init().
db_lookup_ ๐Ÿ”’ โš 
db_set
Only update() can call this. Set a value within the transaction.
db_set_ ๐Ÿ”’ โš 
zkas_db_set
Only deploy() can call this.
zkas_db_set_ ๐Ÿ”’ โš 

Type Aliasesยง

DbHandle