filter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

Variables

View Source
var ErrInvalidFilter = errors.New("invalid filter")

Functions

func IsParsingError

func IsParsingError(err error) bool

func IsUnknownIdentifier

func IsUnknownIdentifier(err error) bool

func IsUnsupportedOperation

func IsUnsupportedOperation(err error) bool

Types

type Identifier

type Identifier struct {
	ExprName string
	DBName   string
	Type     IdentifierType
	JSONSpec JSONTree
}

type IdentifierType

type IdentifierType internal.ExprType

type JSONElement

type JSONElement interface {
	IdentifierType() IdentifierType
}

type JSONLeaf

type JSONLeaf IdentifierType

func (JSONLeaf) IdentifierType

func (l JSONLeaf) IdentifierType() IdentifierType

type JSONTree

type JSONTree map[string]JSONElement

func (JSONTree) IdentifierType

func (l JSONTree) IdentifierType() IdentifierType

type ParsingError

type ParsingError struct {
	Err error
}

func (*ParsingError) Error

func (e *ParsingError) Error() string

type SQLWhereCondition

type SQLWhereCondition string

type Translator

type Translator interface {
	Translate(query string) (SQLWhereCondition, error)
}

func NewTranslator

func NewTranslator(allowedIdentifiers []Identifier, _ TranslatorDialect) Translator

type TranslatorDialect

type TranslatorDialect byte
const (
	TranslatorDialectPostgres TranslatorDialect = iota + 1
)

type UnknownIdentifierError

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

func (*UnknownIdentifierError) Error

func (e *UnknownIdentifierError) Error() string

type UnsupportedOperationError

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

func (*UnsupportedOperationError) Error

func (e *UnsupportedOperationError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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