MCPcopy
hub / github.com/beetbox/beets / remove

Method remove

beets/dbcore/db.py:649–655  ·  view source on GitHub ↗

Remove the object's associated rows from the database.

(self)

Source from the content-addressed store, hash-verified

647 self.clear_dirty()
648
649 def remove(self):
650 """Remove the object's associated rows from the database."""
651 with self.db.transaction() as tx:
652 tx.mutate(f"DELETE FROM {self._table} WHERE id=?", (self.id,))
653 tx.mutate(
654 f"DELETE FROM {self._flex_table} WHERE entity_id=?", (self.id,)
655 )
656
657 def add(self, db: D | None = None):
658 """Add the object to the library database. This object must be

Calls 2

transactionMethod · 0.80
mutateMethod · 0.80