Query#
- class beets.dbcore.query.Query[source]#
Bases:
ABCAn abstract class representing a query into the database.
- __init__()#
Public methods summary
clause()Generate an SQLite expression implementing the query.
match(obj)Check whether this query matches a given Model.
Methods definition
- property field_names: set[str]#
Return a set with field names that this query operates on.
- abstractmethod clause() tuple[str | None, Sequence[Any]][source]#
Generate an SQLite expression implementing the query.
Return (clause, subvals) where clause is a valid sqlite WHERE clause implementing the query and subvals is a list of items to be substituted for ?s in the clause.
The default implementation returns None, falling back to a slow query using match().