5.3.3. Database — Database management and interaction¶
| Threading: | This module is thread-safe. |
|---|
The framework provides each plug-in with a unique SQLite database. Using the Database module, developers can manipulate this database in any way they see fit. Interaction with the database is greatly simplified by the framework functions, which automates many aspects of database management.
TODO: Link to info about CreateDatabase() and DefaultDatabase.sql
This module defines the following functions:
- Database.Exec(sql, values=[])¶
Executes the given SQL statement, passing in any values provided.
TODO: Parameter info
- Database.Commit()¶
- Commits any changes to the database file.
- Database.Rollback()¶
- Rolls back any uncommitted changes.
- Database.Reset()¶
- Resets the database, erasing any data and calling CreateDatabase() and loading DefaultDatabase.sql if required.