MCPcopy Create free account
hub / github.com/Permify/permify / ValidateTupleFilter

Function ValidateTupleFilter

internal/validation/validation.go:51–56  ·  view source on GitHub ↗

ValidateTupleFilter checks if the provided filter conforms to the entity definition

(tupleFilter *base.TupleFilter)

Source from the content-addressed store, hash-verified

49
50// ValidateTupleFilter checks if the provided filter conforms to the entity definition
51func ValidateTupleFilter(tupleFilter *base.TupleFilter) (err error) {
52 if IsTupleFilterEmpty(tupleFilter) {
53 return errors.New(base.ErrorCode_ERROR_CODE_VALIDATION.String())
54 }
55 return nil
56}
57
58// ValidateFilters checks if both provided filters, tupleFilter and attributeFilter, are empty.
59// It returns an error if both filters are empty, as at least one filter should contain criteria for the operation to be valid.

Callers 2

DeleteRelationshipsMethod · 0.92
validation_test.goFile · 0.85

Calls 2

IsTupleFilterEmptyFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected