scope

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByUUID

func ByUUID[P ~func(*sql.Selector)](id string, eqFn func(uuid.UUID) P) []P

ByUUID returns a single-element predicate slice if id is a valid UUID, or nil otherwise. Designed for use with Ent's variadic .Where():

q.Where(scope.ByUUID(id, entity.FieldEQ)...)
preds = append(preds, scope.ByUUID(id, entity.FieldEQ)...)

Types

This section is empty.

Jump to

Keyboard shortcuts

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