query

package
v1.0.0-beta.25 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EOF _TokenKind = iota

	COMMA       // ,
	COLON       // :
	LEFT_PAREN  // (
	RIGHT_PAREN // )
	LEFT_BRACE  // {
	RIGHT_BRACE // }

	IDENTIFIER // argument name
	STRING     // "test"
	BYTE       // 'a'
	INT        // 1
	FLOAT      // 1.0
	NULL       // null
	BOOL       // true, false
)

Variables

View Source
var Keywords = map[string]_TokenKind{
	"true":  BOOL,
	"false": BOOL,
}

Functions

func Parser

func Parser(src []byte) *_Parser

Types

type Query

type Query struct {
	Args   QueryArgs        `json:"args,omitempty"`
	Fields map[string]Query `json:"fields,omitempty"`
}

func (Query) String

func (self Query) String() string

type QueryArgs

type QueryArgs map[string]any

func (QueryArgs) Get

func (self QueryArgs) Get(key string) any

func (QueryArgs) String

func (self QueryArgs) String() string

func (QueryArgs) TryGet

func (self QueryArgs) TryGet(key string, defaultValue any) any

Jump to

Keyboard shortcuts

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