Debian Codegraph @

ent/statement/where.go

raw
1 // Code generated by ent, DO NOT EDIT.
2
3 package statement
4
5 import (
6 "entgo.io/ent/dialect/sql"
7 "entgo.io/ent/dialect/sql/sqlgraph"
8 "github.com/google/uuid"
9 "github.com/in-toto/archivista/ent/predicate"
10 )
11
12 // ID filters vertices based on their ID field.
13 func ID(id uuid.UUID) predicate.Statement {
14 return predicate.Statement(sql.FieldEQ(FieldID, id))
15 }
16
17 // IDEQ applies the EQ predicate on the ID field.
18 func IDEQ(id uuid.UUID) predicate.Statement {
19 return predicate.Statement(sql.FieldEQ(FieldID, id))
20 }
21
22 // IDNEQ applies the NEQ predicate on the ID field.
23 func IDNEQ(id uuid.UUID) predicate.Statement {
24 return predicate.Statement(sql.FieldNEQ(FieldID, id))
25 }
26
27 // IDIn applies the In predicate on the ID field.
28 func IDIn(ids ...uuid.UUID) predicate.Statement {
29 return predicate.Statement(sql.FieldIn(FieldID, ids...))
30 }
31
32 // IDNotIn applies the NotIn predicate on the ID field.
33 func IDNotIn(ids ...uuid.UUID) predicate.Statement {
34 return predicate.Statement(sql.FieldNotIn(FieldID, ids...))
35 }
36
37 // IDGT applies the GT predicate on the ID field.
38 func IDGT(id uuid.UUID) predicate.Statement {
39 return predicate.Statement(sql.FieldGT(FieldID, id))
40 }
41
42 // IDGTE applies the GTE predicate on the ID field.
43 func IDGTE(id uuid.UUID) predicate.Statement {
44 return predicate.Statement(sql.FieldGTE(FieldID, id))
45 }
46
47 // IDLT applies the LT predicate on the ID field.
48 func IDLT(id uuid.UUID) predicate.Statement {
49 return predicate.Statement(sql.FieldLT(FieldID, id))
50 }
51
52 // IDLTE applies the LTE predicate on the ID field.
53 func IDLTE(id uuid.UUID) predicate.Statement {
54 return predicate.Statement(sql.FieldLTE(FieldID, id))
55 }
56
57 // Predicate applies equality check predicate on the "predicate" field. It's identical to PredicateEQ.
58 func Predicate(v string) predicate.Statement {
59 return predicate.Statement(sql.FieldEQ(FieldPredicate, v))
60 }
61
62 // PredicateEQ applies the EQ predicate on the "predicate" field.
63 func PredicateEQ(v string) predicate.Statement {
64 return predicate.Statement(sql.FieldEQ(FieldPredicate, v))
65 }
66
67 // PredicateNEQ applies the NEQ predicate on the "predicate" field.
68 func PredicateNEQ(v string) predicate.Statement {
69 return predicate.Statement(sql.FieldNEQ(FieldPredicate, v))
70 }
71
72 // PredicateIn applies the In predicate on the "predicate" field.
73 func PredicateIn(vs ...string) predicate.Statement {
74 return predicate.Statement(sql.FieldIn(FieldPredicate, vs...))
75 }
76
77 // PredicateNotIn applies the NotIn predicate on the "predicate" field.
78 func PredicateNotIn(vs ...string) predicate.Statement {
79 return predicate.Statement(sql.FieldNotIn(FieldPredicate, vs...))
80 }
81
82 // PredicateGT applies the GT predicate on the "predicate" field.
83 func PredicateGT(v string) predicate.Statement {
84 return predicate.Statement(sql.FieldGT(FieldPredicate, v))
85 }
86
87 // PredicateGTE applies the GTE predicate on the "predicate" field.
88 func PredicateGTE(v string) predicate.Statement {
89 return predicate.Statement(sql.FieldGTE(FieldPredicate, v))
90 }
91
92 // PredicateLT applies the LT predicate on the "predicate" field.
93 func PredicateLT(v string) predicate.Statement {
94 return predicate.Statement(sql.FieldLT(FieldPredicate, v))
95 }
96
97 // PredicateLTE applies the LTE predicate on the "predicate" field.
98 func PredicateLTE(v string) predicate.Statement {
99 return predicate.Statement(sql.FieldLTE(FieldPredicate, v))
100 }
101
102 // PredicateContains applies the Contains predicate on the "predicate" field.
103 func PredicateContains(v string) predicate.Statement {
104 return predicate.Statement(sql.FieldContains(FieldPredicate, v))
105 }
106
107 // PredicateHasPrefix applies the HasPrefix predicate on the "predicate" field.
108 func PredicateHasPrefix(v string) predicate.Statement {
109 return predicate.Statement(sql.FieldHasPrefix(FieldPredicate, v))
110 }
111
112 // PredicateHasSuffix applies the HasSuffix predicate on the "predicate" field.
113 func PredicateHasSuffix(v string) predicate.Statement {
114 return predicate.Statement(sql.FieldHasSuffix(FieldPredicate, v))
115 }
116
117 // PredicateEqualFold applies the EqualFold predicate on the "predicate" field.
118 func PredicateEqualFold(v string) predicate.Statement {
119 return predicate.Statement(sql.FieldEqualFold(FieldPredicate, v))
120 }
121
122 // PredicateContainsFold applies the ContainsFold predicate on the "predicate" field.
123 func PredicateContainsFold(v string) predicate.Statement {
124 return predicate.Statement(sql.FieldContainsFold(FieldPredicate, v))
125 }
126
127 // HasSubjects applies the HasEdge predicate on the "subjects" edge.
128 func HasSubjects() predicate.Statement {
129 return predicate.Statement(func(s *sql.Selector) {
130 step := sqlgraph.NewStep(
131 sqlgraph.From(Table, FieldID),
132 sqlgraph.Edge(sqlgraph.O2M, false, SubjectsTable, SubjectsColumn),
133 )
134 sqlgraph.HasNeighbors(s, step)
135 })
136 }
137
138 // HasSubjectsWith applies the HasEdge predicate on the "subjects" edge with a given conditions (other predicates).
139 func HasSubjectsWith(preds ...predicate.Subject) predicate.Statement {
140 return predicate.Statement(func(s *sql.Selector) {
141 step := newSubjectsStep()
142 sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
143 for _, p := range preds {
144 p(s)
145 }
146 })
147 })
148 }
149
150 // HasPolicy applies the HasEdge predicate on the "policy" edge.
151 func HasPolicy() predicate.Statement {
152 return predicate.Statement(func(s *sql.Selector) {
153 step := sqlgraph.NewStep(
154 sqlgraph.From(Table, FieldID),
155 sqlgraph.Edge(sqlgraph.O2O, false, PolicyTable, PolicyColumn),
156 )
157 sqlgraph.HasNeighbors(s, step)
158 })
159 }
160
161 // HasPolicyWith applies the HasEdge predicate on the "policy" edge with a given conditions (other predicates).
162 func HasPolicyWith(preds ...predicate.AttestationPolicy) predicate.Statement {
163 return predicate.Statement(func(s *sql.Selector) {
164 step := newPolicyStep()
165 sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
166 for _, p := range preds {
167 p(s)
168 }
169 })
170 })
171 }
172
173 // HasAttestationCollections applies the HasEdge predicate on the "attestation_collections" edge.
174 func HasAttestationCollections() predicate.Statement {
175 return predicate.Statement(func(s *sql.Selector) {
176 step := sqlgraph.NewStep(
177 sqlgraph.From(Table, FieldID),
178 sqlgraph.Edge(sqlgraph.O2O, false, AttestationCollectionsTable, AttestationCollectionsColumn),
179 )
180 sqlgraph.HasNeighbors(s, step)
181 })
182 }
183
184 // HasAttestationCollectionsWith applies the HasEdge predicate on the "attestation_collections" edge with a given conditions (other predicates).
185 func HasAttestationCollectionsWith(preds ...predicate.AttestationCollection) predicate.Statement {
186 return predicate.Statement(func(s *sql.Selector) {
187 step := newAttestationCollectionsStep()
188 sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
189 for _, p := range preds {
190 p(s)
191 }
192 })
193 })
194 }
195
196 // HasDsse applies the HasEdge predicate on the "dsse" edge.
197 func HasDsse() predicate.Statement {
198 return predicate.Statement(func(s *sql.Selector) {
199 step := sqlgraph.NewStep(
200 sqlgraph.From(Table, FieldID),
201 sqlgraph.Edge(sqlgraph.O2M, true, DsseTable, DsseColumn),
202 )
203 sqlgraph.HasNeighbors(s, step)
204 })
205 }
206
207 // HasDsseWith applies the HasEdge predicate on the "dsse" edge with a given conditions (other predicates).
208 func HasDsseWith(preds ...predicate.Dsse) predicate.Statement {
209 return predicate.Statement(func(s *sql.Selector) {
210 step := newDsseStep()
211 sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
212 for _, p := range preds {
213 p(s)
214 }
215 })
216 })
217 }
218
219 // And groups predicates with the AND operator between them.
220 func And(predicates ...predicate.Statement) predicate.Statement {
221 return predicate.Statement(sql.AndPredicates(predicates...))
222 }
223
224 // Or groups predicates with the OR operator between them.
225 func Or(predicates ...predicate.Statement) predicate.Statement {
226 return predicate.Statement(sql.OrPredicates(predicates...))
227 }
228
229 // Not applies the not operator on the given predicate.
230 func Not(p predicate.Statement) predicate.Statement {
231 return predicate.Statement(sql.NotPredicates(p))
232 }