Debian Codegraph @

ent/subject/where.go

raw
1 // Code generated by ent, DO NOT EDIT.
2
3 package subject
4
5 import (
6 "time"
7
8 "entgo.io/ent/dialect/sql"
9 "entgo.io/ent/dialect/sql/sqlgraph"
10 "github.com/google/uuid"
11 "github.com/in-toto/archivista/ent/predicate"
12 )
13
14 // ID filters vertices based on their ID field.
15 func ID(id uuid.UUID) predicate.Subject {
16 return predicate.Subject(sql.FieldEQ(FieldID, id))
17 }
18
19 // IDEQ applies the EQ predicate on the ID field.
20 func IDEQ(id uuid.UUID) predicate.Subject {
21 return predicate.Subject(sql.FieldEQ(FieldID, id))
22 }
23
24 // IDNEQ applies the NEQ predicate on the ID field.
25 func IDNEQ(id uuid.UUID) predicate.Subject {
26 return predicate.Subject(sql.FieldNEQ(FieldID, id))
27 }
28
29 // IDIn applies the In predicate on the ID field.
30 func IDIn(ids ...uuid.UUID) predicate.Subject {
31 return predicate.Subject(sql.FieldIn(FieldID, ids...))
32 }
33
34 // IDNotIn applies the NotIn predicate on the ID field.
35 func IDNotIn(ids ...uuid.UUID) predicate.Subject {
36 return predicate.Subject(sql.FieldNotIn(FieldID, ids...))
37 }
38
39 // IDGT applies the GT predicate on the ID field.
40 func IDGT(id uuid.UUID) predicate.Subject {
41 return predicate.Subject(sql.FieldGT(FieldID, id))
42 }
43
44 // IDGTE applies the GTE predicate on the ID field.
45 func IDGTE(id uuid.UUID) predicate.Subject {
46 return predicate.Subject(sql.FieldGTE(FieldID, id))
47 }
48
49 // IDLT applies the LT predicate on the ID field.
50 func IDLT(id uuid.UUID) predicate.Subject {
51 return predicate.Subject(sql.FieldLT(FieldID, id))
52 }
53
54 // IDLTE applies the LTE predicate on the ID field.
55 func IDLTE(id uuid.UUID) predicate.Subject {
56 return predicate.Subject(sql.FieldLTE(FieldID, id))
57 }
58
59 // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
60 func CreatedAt(v time.Time) predicate.Subject {
61 return predicate.Subject(sql.FieldEQ(FieldCreatedAt, v))
62 }
63
64 // Name applies equality check predicate on the "name" field. It's identical to NameEQ.
65 func Name(v string) predicate.Subject {
66 return predicate.Subject(sql.FieldEQ(FieldName, v))
67 }
68
69 // CreatedAtEQ applies the EQ predicate on the "created_at" field.
70 func CreatedAtEQ(v time.Time) predicate.Subject {
71 return predicate.Subject(sql.FieldEQ(FieldCreatedAt, v))
72 }
73
74 // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
75 func CreatedAtNEQ(v time.Time) predicate.Subject {
76 return predicate.Subject(sql.FieldNEQ(FieldCreatedAt, v))
77 }
78
79 // CreatedAtIn applies the In predicate on the "created_at" field.
80 func CreatedAtIn(vs ...time.Time) predicate.Subject {
81 return predicate.Subject(sql.FieldIn(FieldCreatedAt, vs...))
82 }
83
84 // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
85 func CreatedAtNotIn(vs ...time.Time) predicate.Subject {
86 return predicate.Subject(sql.FieldNotIn(FieldCreatedAt, vs...))
87 }
88
89 // CreatedAtGT applies the GT predicate on the "created_at" field.
90 func CreatedAtGT(v time.Time) predicate.Subject {
91 return predicate.Subject(sql.FieldGT(FieldCreatedAt, v))
92 }
93
94 // CreatedAtGTE applies the GTE predicate on the "created_at" field.
95 func CreatedAtGTE(v time.Time) predicate.Subject {
96 return predicate.Subject(sql.FieldGTE(FieldCreatedAt, v))
97 }
98
99 // CreatedAtLT applies the LT predicate on the "created_at" field.
100 func CreatedAtLT(v time.Time) predicate.Subject {
101 return predicate.Subject(sql.FieldLT(FieldCreatedAt, v))
102 }
103
104 // CreatedAtLTE applies the LTE predicate on the "created_at" field.
105 func CreatedAtLTE(v time.Time) predicate.Subject {
106 return predicate.Subject(sql.FieldLTE(FieldCreatedAt, v))
107 }
108
109 // CreatedAtIsNil applies the IsNil predicate on the "created_at" field.
110 func CreatedAtIsNil() predicate.Subject {
111 return predicate.Subject(sql.FieldIsNull(FieldCreatedAt))
112 }
113
114 // CreatedAtNotNil applies the NotNil predicate on the "created_at" field.
115 func CreatedAtNotNil() predicate.Subject {
116 return predicate.Subject(sql.FieldNotNull(FieldCreatedAt))
117 }
118
119 // NameEQ applies the EQ predicate on the "name" field.
120 func NameEQ(v string) predicate.Subject {
121 return predicate.Subject(sql.FieldEQ(FieldName, v))
122 }
123
124 // NameNEQ applies the NEQ predicate on the "name" field.
125 func NameNEQ(v string) predicate.Subject {
126 return predicate.Subject(sql.FieldNEQ(FieldName, v))
127 }
128
129 // NameIn applies the In predicate on the "name" field.
130 func NameIn(vs ...string) predicate.Subject {
131 return predicate.Subject(sql.FieldIn(FieldName, vs...))
132 }
133
134 // NameNotIn applies the NotIn predicate on the "name" field.
135 func NameNotIn(vs ...string) predicate.Subject {
136 return predicate.Subject(sql.FieldNotIn(FieldName, vs...))
137 }
138
139 // NameGT applies the GT predicate on the "name" field.
140 func NameGT(v string) predicate.Subject {
141 return predicate.Subject(sql.FieldGT(FieldName, v))
142 }
143
144 // NameGTE applies the GTE predicate on the "name" field.
145 func NameGTE(v string) predicate.Subject {
146 return predicate.Subject(sql.FieldGTE(FieldName, v))
147 }
148
149 // NameLT applies the LT predicate on the "name" field.
150 func NameLT(v string) predicate.Subject {
151 return predicate.Subject(sql.FieldLT(FieldName, v))
152 }
153
154 // NameLTE applies the LTE predicate on the "name" field.
155 func NameLTE(v string) predicate.Subject {
156 return predicate.Subject(sql.FieldLTE(FieldName, v))
157 }
158
159 // NameContains applies the Contains predicate on the "name" field.
160 func NameContains(v string) predicate.Subject {
161 return predicate.Subject(sql.FieldContains(FieldName, v))
162 }
163
164 // NameHasPrefix applies the HasPrefix predicate on the "name" field.
165 func NameHasPrefix(v string) predicate.Subject {
166 return predicate.Subject(sql.FieldHasPrefix(FieldName, v))
167 }
168
169 // NameHasSuffix applies the HasSuffix predicate on the "name" field.
170 func NameHasSuffix(v string) predicate.Subject {
171 return predicate.Subject(sql.FieldHasSuffix(FieldName, v))
172 }
173
174 // NameEqualFold applies the EqualFold predicate on the "name" field.
175 func NameEqualFold(v string) predicate.Subject {
176 return predicate.Subject(sql.FieldEqualFold(FieldName, v))
177 }
178
179 // NameContainsFold applies the ContainsFold predicate on the "name" field.
180 func NameContainsFold(v string) predicate.Subject {
181 return predicate.Subject(sql.FieldContainsFold(FieldName, v))
182 }
183
184 // HasSubjectDigests applies the HasEdge predicate on the "subject_digests" edge.
185 func HasSubjectDigests() predicate.Subject {
186 return predicate.Subject(func(s *sql.Selector) {
187 step := sqlgraph.NewStep(
188 sqlgraph.From(Table, FieldID),
189 sqlgraph.Edge(sqlgraph.O2M, false, SubjectDigestsTable, SubjectDigestsColumn),
190 )
191 sqlgraph.HasNeighbors(s, step)
192 })
193 }
194
195 // HasSubjectDigestsWith applies the HasEdge predicate on the "subject_digests" edge with a given conditions (other predicates).
196 func HasSubjectDigestsWith(preds ...predicate.SubjectDigest) predicate.Subject {
197 return predicate.Subject(func(s *sql.Selector) {
198 step := newSubjectDigestsStep()
199 sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
200 for _, p := range preds {
201 p(s)
202 }
203 })
204 })
205 }
206
207 // HasStatement applies the HasEdge predicate on the "statement" edge.
208 func HasStatement() predicate.Subject {
209 return predicate.Subject(func(s *sql.Selector) {
210 step := sqlgraph.NewStep(
211 sqlgraph.From(Table, FieldID),
212 sqlgraph.Edge(sqlgraph.M2O, true, StatementTable, StatementColumn),
213 )
214 sqlgraph.HasNeighbors(s, step)
215 })
216 }
217
218 // HasStatementWith applies the HasEdge predicate on the "statement" edge with a given conditions (other predicates).
219 func HasStatementWith(preds ...predicate.Statement) predicate.Subject {
220 return predicate.Subject(func(s *sql.Selector) {
221 step := newStatementStep()
222 sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
223 for _, p := range preds {
224 p(s)
225 }
226 })
227 })
228 }
229
230 // And groups predicates with the AND operator between them.
231 func And(predicates ...predicate.Subject) predicate.Subject {
232 return predicate.Subject(sql.AndPredicates(predicates...))
233 }
234
235 // Or groups predicates with the OR operator between them.
236 func Or(predicates ...predicate.Subject) predicate.Subject {
237 return predicate.Subject(sql.OrPredicates(predicates...))
238 }
239
240 // Not applies the not operator on the given predicate.
241 func Not(p predicate.Subject) predicate.Subject {
242 return predicate.Subject(sql.NotPredicates(p))
243 }