filter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(exprs []*Expression) (any, error)

Build creates a Notion API filter from expressions. Multiple expressions are combined with AND.

func IsValidCondition

func IsValidCondition(cond string) bool

IsValidCondition checks if a condition is recognized.

func NormalizeCondition

func NormalizeCondition(cond string) string

NormalizeCondition converts an alias to its canonical form.

Types

type Expression

type Expression struct {
	Type      string // explicit type override (optional)
	Property  string
	Condition string
	Value     string
}

Expression represents a parsed where expression.

func Parse

func Parse(expr string) (*Expression, error)

Parse parses a where expression. Formats:

  • Property.condition(value)
  • Property.condition()
  • type:Property.condition(value)

func ParseAll

func ParseAll(exprs []string) ([]*Expression, error)

ParseAll parses multiple where expressions.

Jump to

Keyboard shortcuts

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