github.com/weaviate/weaviate@v1.24.6/usecases/traverser/explorer_validate_sort.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package traverser 13 14 import ( 15 "github.com/weaviate/weaviate/entities/filters" 16 "github.com/weaviate/weaviate/entities/schema" 17 ) 18 19 func (e *Explorer) validateSort(className string, sort []filters.Sort) error { 20 if len(sort) == 0 { 21 return nil 22 } 23 sch := e.schemaGetter.GetSchemaSkipAuth() 24 return filters.ValidateSort(sch, schema.ClassName(className), sort) 25 }