package
0.0.2
Repository: https://github.com/yubo/golib.git
Documentation: pkg.go.dev

# Functions

Conflicts takes 2 maps and returns true if there a key match between the maps but the value doesn't match, and returns false in other cases.
ConvertSelectorToFieldsMap converts selector string to fields map and validates keys and values.
Equals returns true if the given maps are equal.
Everything returns a selector that matches all queries.
FormatFields converts field map into plain string.
Merge combines given maps, and does not check for any conflicts between the maps.
NewRequirement is the constructor for a Requirement.
NewSelector returns a nil selector.
Nothing returns a selector that matches no queries.
Parse takes a string representing a selector and returns a selector object, or an error.
ParseToRequirements takes a string representing a selector and returns a list of requirements.
SelectorFromSet returns a Selector which will match exactly the given Set.
SelectorFromValidatedSet returns a Selector which will match exactly the given Set.
ValidatedSelectorFromSet returns a Selector which will match exactly the given Set.

# Constants

ClosedParToken represents close parenthesis.
CommaToken represents the comma.
DoesNotExistToken represents logic notDoesNotExistToken DoubleEqualsToken represents double equals.
EndOfStringToken represents end of string.
EqualsToken represents equal.
ErrorToken represents scan error.
GreaterThanToken represents greater than.
IdentifierToken represents identifier, e.g.
InToken represents in.
KeyAndOperator represents key and operator.
LessThanToken represents less than.
NotEqualsToken represents not equal.
NotInToken represents not in.
OpenParToken represents open parenthesis.
Values represents values.

# Structs

Lexer represents the Lexer struct for query selector.
Parser data structure contains the query selector parser data structure.
Requirement contains values, a key, and an operator that relates the key and values.
ScannedItem contains the Token and the literal produced by the lexer.

# Interfaces

Queries allows you to present fields independently from their storage.
Selector represents a query selector.

# Type aliases

ByKey sorts requirements by key to obtain deterministic parser.
ParserContext represents context during parsing: some literal for example 'in' and 'notin' can be recognized as operator for example 'x in (a)' but it can be recognized as value for example 'value in (in)'.
Requirements is AND of all requirements.
Set is a map of field:value.
Token represents constant definition for lexer token.