QueryLookup
What a search clause can look up in order to narrow the rows that it has to check. It is read only.
Methods
Section titled “Methods”ancestors()
Section titled “ancestors()”ancestors(id): string[];Lists the rows above a row.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
string |
the id of the row |
Returns
Section titled “Returns”string[]
the ids of the ancestors, nearest first
index()
Section titled “index()”index(facet, path): | { entries(): [string | number | boolean, string[]][]; eq(value): string[]; prefix(prefix): string[]; range(lo, hi): string[]; under(path): string[];} | undefined;Returns the index of one path of a facet, which finds rows by the value of that path without checking every row. It exists only when the facet declares that path in its paths.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
facet |
Pick<FacetRef<unknown>, "key"> |
the facet |
path |
string |
the path inside the value, where . designates the whole value |
Returns
Section titled “Returns”| {
entries(): [string | number | boolean, string[]][];
eq(value): string[];
prefix(prefix): string[];
range(lo, hi): string[];
under(path): string[];
}
| undefined
the index, or undefined when the facet does not declare that path
text()
Section titled “text()”text(words): string[];Finds the rows whose text contains the given words.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
words |
readonly string[] |
the words to look for |
Returns
Section titled “Returns”string[]
the ids of the rows
