Quote:
Originally Posted by BetterRed
@chaley - what is the source of the data in the tree?
BR
|
The query expression, possibly composed with the restriction expression(s). It uses a recursive descent parser. Saved searches are expanded when encountered.
The grammar is very simple.
Code:
prog ::= or_expression
or_expression ::= and_expression [ 'or' or_expression ]
and_expression ::= not_expression [ [ 'and' ] and_expression ]
not_expression ::= [ 'not' ] location_expression
location_expression ::= base_token | ( '(' or_expression ')' )
base_token ::= a sequence of letters and colons, perhaps quoted
The base_token node is actually more complex than the grammar would indicate. The parser separates out the column name and deals with quotes.
However, you might be asking about the source of the data for the books. That is, of course, the database, but by the time search sees the data, it has been flattened into a single table representation, one row per book, every field in its own column even if that field contains multiple values. Only the very bottom layers of calibre know anything about the database and its underlying table structure.