aql

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 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) *Parser

func (*Parser) ParseQuery

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

type Query

type Query struct {
	Type   string
	Filter map[string]interface{}
	Links  []*Query
	Cursor *string
}

func Parse

func Parse(input string) (*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_LPAREN
	TOKEN_RPAREN
	TOKEN_LBRACE
	TOKEN_RBRACE
	TOKEN_STRING
	TOKEN_COMMA
)

Jump to

Keyboard shortcuts

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