Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEntSelectorFromJSONFilter ¶
func BuildEntSelectorFromJSONFilter(jsonFilter *JSONFilter) (*entsql.Predicate, error)
BuildEntSelectorFromJSONFilter constructs an Ent SQL predicate for JSON filtering.
Types ¶
type JSONFilter ¶
type JSONFilter struct { // Column is the name of the JSON column. Column string // FieldPath is the path to the field in the JSON object. // It's the inner path within the json column. It accepts dot notation. // Example: // "metadata.name" for {"metadata": {"name": "foo"}} FieldPath string // Value is the value to compare against. Value any // Operator is the comparison operator. Operator JSONOperator }
JSONFilter represents a filter for JSON fields.
type JSONOperator ¶
type JSONOperator string
JSONOperator represents supported JSON filter operators.
const ( OpEQ JSONOperator = "eq" OpNEQ JSONOperator = "neq" OpIN JSONOperator = "in" )
Click to show internal directories.
Click to hide internal directories.