query

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperationEndsWith   = "endswith"
	OperationContains   = "contains"
	OperationStartsWith = "startswith"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultExpression

type DefaultExpression struct {
	Contains   string
	Expression string
}

type ParsedQuery

type ParsedQuery interface {
	Filter(*gorm.DB) *gorm.DB
}

type QueryParser

type QueryParser struct {
	Default  DefaultExpression
	Tables   map[string]string
	TzOffset int
}

func (*QueryParser) Parse

func (qp *QueryParser) Parse(q string) (ParsedQuery, error)

type SyntaxError

type SyntaxError struct {
	Statement string `json:"statement"`
	Line      int    `json:"line"`
	Offset    int    `json:"offset"`
	EndOffset int    `json:"end_offset"`
	Err       string `json:"error,omitempty"`
}

func (SyntaxError) Code

func (s SyntaxError) Code() int

func (SyntaxError) Detail

func (s SyntaxError) Detail() any

func (SyntaxError) Error

func (s SyntaxError) Error() string

func (SyntaxError) Is

func (s SyntaxError) Is(target error) bool

func (SyntaxError) Message

func (s SyntaxError) Message() string

Jump to

Keyboard shortcuts

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