filter

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MemoFilterCELAttributes = []cel.EnvOption{
	cel.Variable("content", cel.StringType),

	cel.Variable("create_time", cel.StringType),
	cel.Variable("tag", cel.StringType),
	cel.Variable("update_time", cel.StringType),
	cel.Variable("visibility", cel.StringType),
}

MemoFilterCELAttributes are the CEL attributes for memo.

Functions

func GetConstValue

func GetConstValue(expr *exprv1.Expr) (any, error)

GetConstValue returns the constant value of the expression.

func GetIdentExprName

func GetIdentExprName(expr *exprv1.Expr) (string, error)

GetIdentExprName returns the name of the identifier expression.

func Parse

func Parse(filter string, opts ...cel.EnvOption) (expr *exprv1.ParsedExpr, err error)

Parse parses the filter string and returns the parsed expression. The filter string should be a CEL expression.

Types

type ConvertContext

type ConvertContext struct {
	Buffer strings.Builder
	Args   []any
	// The offset of the next argument in the condition string.
	// Mainly using for PostgreSQL.
	ArgsOffset int
}

func NewConvertContext

func NewConvertContext() *ConvertContext

Jump to

Keyboard shortcuts

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