Expand description
Functions§
- init_db
- This function initializes the database by checking whether it needs to be created or upgraded.
The
ddlsare theDDL(Data Definition Language) statements to create the tables in the database and their initial required content. Theschema_versionwill be set inside the database if it is newly created. Otherwise, the version is read from the database and returned. This value should be checked against the expected version to determine if the database needs to be upgraded. It is up to the caller to close the database if an error is returned by this function. - open
- Opens a database at the given path. If the database does not exist, it will be created.
- open_
file - Opens for creates a database at the specified path
- open_
memory - Opens for creates an in-memory database