Documentation ¶
Index ¶
- Constants
- func IsInternalProperty(propName schema.PropertyName) bool
- func ValidateCursor(className schema.ClassName, cursor *Cursor, offset int, filters *LocalFilter, ...) error
- func ValidateFilters(fn func(string) *models.Class, filters *LocalFilter) error
- func ValidateSort(getClass func(string) *models.Class, className schema.ClassName, sort []Sort) error
- type AnalyticsProps
- type Clause
- type Cursor
- type GeoRange
- type LocalFilter
- type Operator
- type Pagination
- type Path
- type Sort
- type Value
Constants ¶
const ( InternalPropBackwardsCompatID = "id" InternalPropID = "_id" InternalNullIndex = "_nullState" InternalPropertyLength = "_propertyLength" InternalPropCreationTimeUnix = "_creationTimeUnix" InternalPropLastUpdateTimeUnix = "_lastUpdateTimeUnix" )
const ( InternalNotNullState = iota InternalNullState )
NotNullState is encoded as 0, so it can be read with the IsNull operator and value false.
const ( // LimitFlagSearchByDist indicates that the // vector search should be conducted by // distance, without limit LimitFlagSearchByDist int = iota - 2 // LimitFlagNotSet indicates that no limit // was provided by the client LimitFlagNotSet )
Variables ¶
This section is empty.
Functions ¶
func IsInternalProperty ¶
func IsInternalProperty(propName schema.PropertyName) bool
func ValidateCursor ¶ added in v1.18.0
func ValidateFilters ¶
func ValidateFilters(fn func(string) *models.Class, filters *LocalFilter) error
Types ¶
type AnalyticsProps ¶
AnalyticsProps will be extracted from the graphql args of analytics functions (such as Meta and Aggregate). They tell the connectors whether to use an external analytics engine if such an engine is configured.
type Cursor ¶ added in v1.18.0
func ExtractCursorFromArgs ¶ added in v1.18.0
ExtractCursorFromArgs gets the limit key out of a map. Not specific to GQL, but can be used from GQL
type GeoRange ¶
type GeoRange struct { *models.GeoCoordinates Distance float32 `json:"distance"` }
GeoRange to be used with fields of type GeoCoordinates. Identifies a point and a maximum distance from that point.
type LocalFilter ¶
type LocalFilter struct {
Root *Clause `json:"root"`
}
type Pagination ¶
func ExtractPaginationFromArgs ¶
func ExtractPaginationFromArgs(args map[string]interface{}) (*Pagination, error)
ExtractPaginationFromArgs gets the limit key out of a map. Not specific to GQL, but can be used from GQL
type Path ¶
type Path struct { Class schema.ClassName `json:"class"` Property schema.PropertyName `json:"property"` // If nil, then this is the property we're interested in. // If a pointer to another Path, the constraint applies to that one. Child *Path `json:"child"` }
Represents the path in a filter. Either RelationProperty or PrimitiveProperty must be empty (e.g. "").
func ParsePath ¶
ParsePath Parses the path It parses an array of strings in this format [0] ClassName -> The root class name we're drilling down from [1] propertyName -> The property name we're interested in.
func (*Path) GetInnerMost ¶
GetInnerMost recursively searches for child paths, only when no more children can be found will the path be returned
func (*Path) SliceInterface ¶
func (p *Path) SliceInterface() []interface{}
type Sort ¶
Sort contains path and order (asc, desc) information
func ExtractSortFromArgs ¶
func ExtractSortFromArgs(in []interface{}) []Sort
ExtractSortFromArgs gets the sort parameters