query_preprocess

@accepts(RB.RhythmDBQuery)
@returns(none)
def query_preprocess(query)

Preprocesses a query to prepare it for execution. This has two main roles: to perform expensive data transformations once per query, rather than once per entry, and converting criteria to lower-level forms that are implemented by the database backend.

For RHYTHMDB_PROP_SEARCH_MATCH, this converts the search terms into an array of case-folded words.

When matching against case-folded properties such as RHYTHMDB_PROP_TITLE_FOLDED, this case-folds the query value.

When performing year-based criteria such as RHYTHMDB_QUERY_PROP_YEAR_LESS, it converts the year into the Julian date such that a simple numeric comparison will work.

query :

query to preprocess