cql2

package module
v0.0.0-...-d353d3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

go-cql2

CQL2 parser for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CQL2

type CQL2 struct {
	Expressions []*Expression `@@`
}

func ParseText

func ParseText(s string) (*CQL2, error)

type CharacterExpression

type CharacterExpression struct {
}

type Expression

type Expression struct {
	Lhs *Predicate `@@`
	Op  string     `( ( @Operator )? | ( @"AND" )? | ( @"OR" )? )!`
	Rhs *Predicate `@@`
}

type IsLikePredicate

type IsLikePredicate struct {
	Lhs *CharacterExpression `@Ident`
	Not bool                 `"NOT"`
	Rhs *PatternExpression   `"LIKE" @@`
}

type PatternExpression

type PatternExpression struct {
}

type Predicate

type Predicate struct {
	Lhs string `@Ident`
	Op  string `@Operator`
	Rhs *Value `@@`
}

type Value

type Value struct {
	Number        *float64 `  @Number`
	String        *string  `| @String`
	Identifier    *string  `| @Ident`
	Bool          *string  `| ( @"true" | "false" )`
	Nil           bool     `| @"nil"`
	SubExpression *CQL2    `| "(" @@ ")" `
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL