Documentation
¶
Overview ¶
Package pathquery supplies format-neutral matching primitives for dynamic path evaluators. It is authored in Go+ and generated into portable Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Match ¶
Match compares UTF-8 strings without allocating. Invalid UTF-8 bytes are treated consistently as RuneError code points.
func Relate ¶
func Relate[T any]( left, right T, relation Relation, equal func(T, T) bool, less func(T, T) bool, ) bool
Relate evaluates equality and ordering without imposing a format's scalar representation. Like and NotLike are intentionally handled by RelateString.
func RelateString ¶
RelateString adds wildcard Like/NotLike to ordinary lexical relations.
Types ¶
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern is an immutable wildcard pattern. '*' matches zero or more Unicode code points and '?' matches exactly one code point.
type Relation ¶
type Relation uint8
Relation is the format-neutral algebra used by path-query predicates. Concrete formats retain responsibility for parsing and coercing operands.
func ParseRelation ¶
ParseRelation recognizes the conventional dynamic-query spellings.