query

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: BSD-3-Clause Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And

func And(queries []string) string

func Between

func Between(attribute string, start, end interface{}) string

func Contains

func Contains(attribute string, value interface{}) string

Contains filters resources where attribute contains the specified value. For string attributes, checks if the string contains the substring.

Note: For array attributes, use ContainsAny or ContainsAll instead.

func ContainsAll added in v0.17.0

func ContainsAll(attribute string, value []interface{}) string

ContainsAll filters resources where attribute contains ALL of the specified values. For array and relationship attributes, matches documents where the attribute contains every one of the given values.

func ContainsAny added in v0.17.0

func ContainsAny(attribute string, value []interface{}) string

ContainsAny filters resources where attribute contains ANY of the specified values. For array and relationship attributes, matches documents where the attribute contains at least one of the given values.

func CreatedAfter added in v0.10.0

func CreatedAfter(value interface{}) string

func CreatedBefore added in v0.10.0

func CreatedBefore(value interface{}) string

func CreatedBetween added in v0.11.0

func CreatedBetween(start, end interface{}) string

func Crosses added in v0.11.0

func Crosses(attribute string, values []interface{}) string

func CursorAfter

func CursorAfter(documentId string) string

func CursorBefore

func CursorBefore(documentId interface{}) string

func DistanceEqual added in v0.11.0

func DistanceEqual(attribute string, values []interface{}, distance float64, meters bool) string

func DistanceGreaterThan added in v0.11.0

func DistanceGreaterThan(attribute string, values []interface{}, distance float64, meters bool) string

func DistanceLessThan added in v0.11.0

func DistanceLessThan(attribute string, values []interface{}, distance float64, meters bool) string

func DistanceNotEqual added in v0.11.0

func DistanceNotEqual(attribute string, values []interface{}, distance float64, meters bool) string

func ElemMatch added in v0.17.0

func ElemMatch(attribute string, queries []string) string

ElemMatch filters array elements where at least one element matches all the specified queries.

attribute: The attribute containing the array to filter on. queries: The list of query strings to match against array elements. Returns the query string.

func EndsWith

func EndsWith(attribute string, value interface{}) string

func Equal

func Equal(attribute string, value interface{}) string

func Exists added in v0.17.0

func Exists(attributes []interface{}) string

Exists filters resources where the specified attributes exist.

attributes: The list of attributes that must exist. Returns the query string.

func GreaterThan

func GreaterThan(attribute string, value interface{}) string

func GreaterThanEqual

func GreaterThanEqual(attribute string, value interface{}) string

func Intersects added in v0.11.0

func Intersects(attribute string, values []interface{}) string

func IsNotNull

func IsNotNull(attribute string) string

func IsNull

func IsNull(attribute string) string

func LessThan

func LessThan(attribute string, value interface{}) string

func LessThanEqual

func LessThanEqual(attribute string, value interface{}) string

func Limit

func Limit(limit int) string

func NotBetween added in v0.10.0

func NotBetween(attribute string, start, end interface{}) string

func NotContains added in v0.10.0

func NotContains(attribute string, value interface{}) string

func NotCrosses added in v0.11.0

func NotCrosses(attribute string, values []interface{}) string

func NotEndsWith added in v0.10.0

func NotEndsWith(attribute string, value interface{}) string

func NotEqual

func NotEqual(attribute string, value interface{}) string

func NotExists added in v0.17.0

func NotExists(attributes []interface{}) string

NotExists filters resources where the specified attributes do not exist.

attributes: The list of attributes that must not exist. Returns the query string.

func NotIntersects added in v0.11.0

func NotIntersects(attribute string, values []interface{}) string

func NotOverlaps added in v0.11.0

func NotOverlaps(attribute string, values []interface{}) string

func NotSearch added in v0.10.0

func NotSearch(attribute string, value interface{}) string

func NotStartsWith added in v0.10.0

func NotStartsWith(attribute string, value interface{}) string

func NotTouches added in v0.11.0

func NotTouches(attribute string, values []interface{}) string

func Offset

func Offset(offset int) string

func Or

func Or(queries []string) string

func OrderAsc

func OrderAsc(attribute string) string

func OrderDesc

func OrderDesc(attribute string) string

func OrderRandom added in v0.12.0

func OrderRandom() string

func Overlaps added in v0.11.0

func Overlaps(attribute string, values []interface{}) string

func Regex added in v0.17.0

func Regex(attribute string, pattern string) string

Regex filters resources where attribute matches a regular expression pattern.

attribute: The attribute to filter on. pattern: The regular expression pattern to match. Returns the query string.

func Search(attribute string, value interface{}) string

func Select

func Select(attributes interface{}) string

func StartsWith

func StartsWith(attribute string, value interface{}) string

func Touches added in v0.11.0

func Touches(attribute string, values []interface{}) string

func UpdatedAfter added in v0.10.0

func UpdatedAfter(value interface{}) string

func UpdatedBefore added in v0.10.0

func UpdatedBefore(value interface{}) string

func UpdatedBetween added in v0.11.0

func UpdatedBetween(start, end interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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