Transaction#
- class beets.dbcore.db.Transaction(db: Database)[source]#
Bases:
objectA context manager for safe, concurrent access to the database. All SQL commands should be executed through a transaction.
Public methods summary
mutate(statement[, subvals])Execute an SQL statement with substitution values and return the row ID of the last affected row.
query(statement[, subvals])Execute an SQL statement with substitution values and return a list of rows from the database.
script(statements)Execute a string containing multiple SQL statements.
Methods definition
- mutate(statement: str, subvals: Sequence[SQLiteType] = ()) Any[source]#
Execute an SQL statement with substitution values and return the row ID of the last affected row.