From 7beda3fb2b785291c2c7ff3d471cec0d80f7b3af Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:58:48 +0300 Subject: [PATCH] ent: export all generated query operations (#4001) --- ent.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ent.go b/ent.go index 0250d6d27..82670641f 100644 --- a/ent.go +++ b/ent.go @@ -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.