ent: export all generated query operations (#4001)

This commit is contained in:
Ariel Mashraki
2024-04-04 11:58:48 +03:00
committed by GitHub
parent 9c202cde22
commit 7beda3fb2b

14
ent.go
View File

@@ -476,6 +476,20 @@ const (
// Is reports whether o is match the given operation.
func (i Op) Is(o Op) bool { return i&o != 0 }
// List of query operations used by the codegen.
const (
OpQueryFirst = "First"
OpQueryFirstID = "FirstID"
OpQueryOnly = "Only"
OpQueryOnlyID = "OnlyID"
OpQueryAll = "All"
OpQueryIDs = "IDs"
OpQueryCount = "Count"
OpQueryExist = "Exist"
OpQueryGroupBy = "GroupBy"
OpQuerySelect = "Select"
)
type (
// QueryContext contains additional information about
// the context in which the query is executed.