View Single Post
Old 09-28-2013, 09:33 AM   #17
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
@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.
chaley is offline   Reply With Quote