QueryClause
One condition of a search, which a clause function returns for the words it understands. A clause has two parts, and both are optional. narrow uses an index to reduce the rows to check, and test checks one row.
Methods
Section titled “Methods”narrow()?
Section titled “narrow()?”narrow?(lookup): Iterable<string, any, any> | undefined;Gives the ids of a set of rows that includes every row that can satisfy the condition. It may include rows that do not satisfy it, because test removes them. Returning undefined means that the condition cannot narrow the rows.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
lookup |
QueryLookup |
what the clause can look up in the indexes |
Returns
Section titled “Returns”Iterable<string, any, any> | undefined
the ids of the rows to check, or undefined
test()?
Section titled “test()?”test?(row, view): boolean;Checks whether one row satisfies the condition.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
row |
RowView |
the row to check |
view |
StateView |
the state of the library |
Returns
Section titled “Returns”boolean
true when the row satisfies the condition
