aql

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(input string) *Lexer

func (*Lexer) NextToken

func (l *Lexer) NextToken() Token

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(l *Lexer, params ...interface{}) *Parser

func (*Parser) ParseQuery

func (p *Parser) ParseQuery() (*Query, error)

type Query

type Query struct {
	Type   string
	Filter []openapi.Filter
	Links  []*Query
}

func Parse

func Parse(input string, params ...interface{}) (*Query, error)

func (*Query) String

func (q *Query) String() string

func (*Query) ToSearchRequest

func (q *Query) ToSearchRequest() *openapi.SearchRequest

ToSearchRequest converts an AQL Query to an openapi.SearchRequest

type Token

type Token struct {
	Type    TokenType
	Literal string
}

type TokenType

type TokenType int
const (
	TOKEN_ILLEGAL TokenType = iota
	TOKEN_EOF
	TOKEN_IDENT
	TOKEN_EQUALS
	TOKEN_LESS
	TOKEN_GREATER
	TOKEN_PREFIX
	TOKEN_LPAREN
	TOKEN_RPAREN
	TOKEN_LBRACE
	TOKEN_RBRACE
	TOKEN_STRING
	TOKEN_COMMA
	TOKEN_PARAM // New token type for parameter placeholders
	TOKEN_AND   // Logical AND operator (& or &&)
	TOKEN_SKIP  // Skip operator ($)
)

Jump to

Keyboard shortcuts

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