Documentation
¶
Index ¶
- Constants
- type ErrInvalidBool
- type ErrInvalidIdentifier
- type ErrInvalidKeyword
- type ErrInvalidNumber
- type ErrInvalidSelectorPath
- type ErrUnsupportedCharacter
- type ErrUnsupportedCoerce
- type ErrUnsupportedTypeComparison
- type ErrUnterminatedString
- type Expression
- type LexerResult
- type Token
- type TokenKind
- type Tokenizer
Constants ¶
const ( SelectorPath = iota QuotedString Number BooleanTrue BooleanFalse Null Equals Add Subtract Multiply Divide Gt Gte Lt Lte And Or Not Contains ContainsAny ContainsAll In Between StartsWith EndsWith OpenBracket CloseBracket Comma OpenParen CloseParen Coerce Identifier )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrInvalidBool ¶
type ErrInvalidBool struct {
// contains filtered or unexported fields
}
ErrInvalidBool represents an invalid boolean
func (ErrInvalidBool) Error ¶
func (e ErrInvalidBool) Error() string
type ErrInvalidIdentifier ¶
type ErrInvalidIdentifier struct {
// contains filtered or unexported fields
}
ErrInvalidIdentifier represents an invalid identifier
func (ErrInvalidIdentifier) Error ¶
func (e ErrInvalidIdentifier) Error() string
type ErrInvalidKeyword ¶
type ErrInvalidKeyword struct {
// contains filtered or unexported fields
}
ErrInvalidKeyword represents an invalid keyword keyword
func (ErrInvalidKeyword) Error ¶
func (e ErrInvalidKeyword) Error() string
type ErrInvalidNumber ¶
type ErrInvalidNumber struct {
// contains filtered or unexported fields
}
ErrInvalidNumber represents an invalid number
func (ErrInvalidNumber) Error ¶
func (e ErrInvalidNumber) Error() string
type ErrInvalidSelectorPath ¶ added in v0.2.0
type ErrInvalidSelectorPath struct {
// contains filtered or unexported fields
}
ErrInvalidSelectorPath represents an invalid selector string
func (ErrInvalidSelectorPath) Error ¶ added in v0.2.0
func (e ErrInvalidSelectorPath) Error() string
type ErrUnsupportedCharacter ¶
type ErrUnsupportedCharacter struct {
// contains filtered or unexported fields
}
ErrUnsupportedCharacter represents an unsupported character is expression being lexed.
func (ErrUnsupportedCharacter) Error ¶
func (e ErrUnsupportedCharacter) Error() string
type ErrUnsupportedCoerce ¶ added in v0.2.0
type ErrUnsupportedCoerce struct {
// contains filtered or unexported fields
}
ErrUnsupportedCoerce represents a comparison of incompatible types type casts
func (ErrUnsupportedCoerce) Error ¶ added in v0.2.0
func (e ErrUnsupportedCoerce) Error() string
type ErrUnsupportedTypeComparison ¶
type ErrUnsupportedTypeComparison struct {
// contains filtered or unexported fields
}
ErrUnsupportedTypeComparison represents a comparison of incompatible types
func (ErrUnsupportedTypeComparison) Error ¶
func (e ErrUnsupportedTypeComparison) Error() string
type ErrUnterminatedString ¶
type ErrUnterminatedString struct {
// contains filtered or unexported fields
}
ErrUnterminatedString represents an unterminated string
func (ErrUnterminatedString) Error ¶
func (e ErrUnterminatedString) Error() string
type Expression ¶
type Expression interface { // Calculate will execute the parsed expression and apply it against the supplied data. // // # Errors // // Will return `Err` if the expression cannot be applied to the supplied data due to invalid // data type comparisons. Calculate(src []byte) (any, error) }
func Parse ¶
func Parse(expression []byte) (Expression, error)
Parse lex's' the provided expression and returns an Expression to be used/applied to data.
type LexerResult ¶
type LexerResult struct {
// contains filtered or unexported fields
}
LexerResult represents a token lexed result
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token represents a lexed token
type Tokenizer ¶
type Tokenizer struct {
// contains filtered or unexported fields
}
Tokenizer is a lexer for the KSQL expression syntax.
func NewTokenizer ¶ added in v0.2.0
NewTokenizer creates a new tokenizer for use