startsWith
startsWith<
N>(name,prefix):StartsWithNode<{name:N;type:"str"; }>
Defined in: src/query/expression.ts:409
Attribute is a str beginning with this prefix.
The match is on raw UTF-8 bytes with no normalization — it is the index encoding, so
startsWith("name", "é") matches only the same byte sequence, not another normal form of it.
Type Parameters
Section titled “Type Parameters”N extends string
Parameters
Section titled “Parameters”N
prefix
Section titled “prefix”The prefix, as a bare string or a str value.
string | StrValue
Returns
Section titled “Returns”StartsWithNode<{ name: N; type: "str"; }>
Throws
Section titled “Throws”If the name is outside the attribute name grammar.
Throws
Section titled “Throws”If the name starts with $ but is not a queryable system
attribute.
Throws
Section titled “Throws”If given a value that is not a str, or a system attribute
(none of which is a str).
Example
Section titled “Example”startsWith("desc", "ab") // desc STARTSWITH str('ab')