forked from ogen-go/ent2ogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
where.go
536 lines (445 loc) · 20.4 KB
/
where.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
// Code generated by ent, DO NOT EDIT.
package schemaa
import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/ogen-go/ent2ogen/internal/test/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLTE(FieldID, id))
}
// Int64 applies equality check predicate on the "int64" field. It's identical to Int64EQ.
func Int64(v int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldInt64, v))
}
// StringBindtoFoobar applies equality check predicate on the "string_bindto_foobar" field. It's identical to StringBindtoFoobarEQ.
func StringBindtoFoobar(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldStringBindtoFoobar, v))
}
// StringOptionalNullable applies equality check predicate on the "string_optional_nullable" field. It's identical to StringOptionalNullableEQ.
func StringOptionalNullable(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldStringOptionalNullable, v))
}
// OptionalNullableBool applies equality check predicate on the "optional_nullable_bool" field. It's identical to OptionalNullableBoolEQ.
func OptionalNullableBool(v bool) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldOptionalNullableBool, v))
}
// Bytes applies equality check predicate on the "bytes" field. It's identical to BytesEQ.
func Bytes(v []byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldBytes, v))
}
// Int64EQ applies the EQ predicate on the "int64" field.
func Int64EQ(v int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldInt64, v))
}
// Int64NEQ applies the NEQ predicate on the "int64" field.
func Int64NEQ(v int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldInt64, v))
}
// Int64In applies the In predicate on the "int64" field.
func Int64In(vs ...int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldIn(FieldInt64, vs...))
}
// Int64NotIn applies the NotIn predicate on the "int64" field.
func Int64NotIn(vs ...int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotIn(FieldInt64, vs...))
}
// Int64GT applies the GT predicate on the "int64" field.
func Int64GT(v int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGT(FieldInt64, v))
}
// Int64GTE applies the GTE predicate on the "int64" field.
func Int64GTE(v int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGTE(FieldInt64, v))
}
// Int64LT applies the LT predicate on the "int64" field.
func Int64LT(v int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLT(FieldInt64, v))
}
// Int64LTE applies the LTE predicate on the "int64" field.
func Int64LTE(v int64) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLTE(FieldInt64, v))
}
// StringBindtoFoobarEQ applies the EQ predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarEQ(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarNEQ applies the NEQ predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarNEQ(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarIn applies the In predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarIn(vs ...string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldIn(FieldStringBindtoFoobar, vs...))
}
// StringBindtoFoobarNotIn applies the NotIn predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarNotIn(vs ...string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotIn(FieldStringBindtoFoobar, vs...))
}
// StringBindtoFoobarGT applies the GT predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarGT(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGT(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarGTE applies the GTE predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarGTE(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGTE(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarLT applies the LT predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarLT(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLT(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarLTE applies the LTE predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarLTE(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLTE(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarContains applies the Contains predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarContains(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldContains(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarHasPrefix applies the HasPrefix predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarHasPrefix(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldHasPrefix(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarHasSuffix applies the HasSuffix predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarHasSuffix(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldHasSuffix(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarEqualFold applies the EqualFold predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarEqualFold(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEqualFold(FieldStringBindtoFoobar, v))
}
// StringBindtoFoobarContainsFold applies the ContainsFold predicate on the "string_bindto_foobar" field.
func StringBindtoFoobarContainsFold(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldContainsFold(FieldStringBindtoFoobar, v))
}
// StringOptionalNullableEQ applies the EQ predicate on the "string_optional_nullable" field.
func StringOptionalNullableEQ(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldStringOptionalNullable, v))
}
// StringOptionalNullableNEQ applies the NEQ predicate on the "string_optional_nullable" field.
func StringOptionalNullableNEQ(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldStringOptionalNullable, v))
}
// StringOptionalNullableIn applies the In predicate on the "string_optional_nullable" field.
func StringOptionalNullableIn(vs ...string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldIn(FieldStringOptionalNullable, vs...))
}
// StringOptionalNullableNotIn applies the NotIn predicate on the "string_optional_nullable" field.
func StringOptionalNullableNotIn(vs ...string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotIn(FieldStringOptionalNullable, vs...))
}
// StringOptionalNullableGT applies the GT predicate on the "string_optional_nullable" field.
func StringOptionalNullableGT(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGT(FieldStringOptionalNullable, v))
}
// StringOptionalNullableGTE applies the GTE predicate on the "string_optional_nullable" field.
func StringOptionalNullableGTE(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGTE(FieldStringOptionalNullable, v))
}
// StringOptionalNullableLT applies the LT predicate on the "string_optional_nullable" field.
func StringOptionalNullableLT(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLT(FieldStringOptionalNullable, v))
}
// StringOptionalNullableLTE applies the LTE predicate on the "string_optional_nullable" field.
func StringOptionalNullableLTE(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLTE(FieldStringOptionalNullable, v))
}
// StringOptionalNullableContains applies the Contains predicate on the "string_optional_nullable" field.
func StringOptionalNullableContains(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldContains(FieldStringOptionalNullable, v))
}
// StringOptionalNullableHasPrefix applies the HasPrefix predicate on the "string_optional_nullable" field.
func StringOptionalNullableHasPrefix(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldHasPrefix(FieldStringOptionalNullable, v))
}
// StringOptionalNullableHasSuffix applies the HasSuffix predicate on the "string_optional_nullable" field.
func StringOptionalNullableHasSuffix(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldHasSuffix(FieldStringOptionalNullable, v))
}
// StringOptionalNullableIsNil applies the IsNil predicate on the "string_optional_nullable" field.
func StringOptionalNullableIsNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldIsNull(FieldStringOptionalNullable))
}
// StringOptionalNullableNotNil applies the NotNil predicate on the "string_optional_nullable" field.
func StringOptionalNullableNotNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotNull(FieldStringOptionalNullable))
}
// StringOptionalNullableEqualFold applies the EqualFold predicate on the "string_optional_nullable" field.
func StringOptionalNullableEqualFold(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEqualFold(FieldStringOptionalNullable, v))
}
// StringOptionalNullableContainsFold applies the ContainsFold predicate on the "string_optional_nullable" field.
func StringOptionalNullableContainsFold(v string) predicate.SchemaA {
return predicate.SchemaA(sql.FieldContainsFold(FieldStringOptionalNullable, v))
}
// OptionalNullableBoolEQ applies the EQ predicate on the "optional_nullable_bool" field.
func OptionalNullableBoolEQ(v bool) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldOptionalNullableBool, v))
}
// OptionalNullableBoolNEQ applies the NEQ predicate on the "optional_nullable_bool" field.
func OptionalNullableBoolNEQ(v bool) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldOptionalNullableBool, v))
}
// OptionalNullableBoolIsNil applies the IsNil predicate on the "optional_nullable_bool" field.
func OptionalNullableBoolIsNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldIsNull(FieldOptionalNullableBool))
}
// OptionalNullableBoolNotNil applies the NotNil predicate on the "optional_nullable_bool" field.
func OptionalNullableBoolNotNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotNull(FieldOptionalNullableBool))
}
// JsontypeStringsOptionalIsNil applies the IsNil predicate on the "jsontype_strings_optional" field.
func JsontypeStringsOptionalIsNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldIsNull(FieldJsontypeStringsOptional))
}
// JsontypeStringsOptionalNotNil applies the NotNil predicate on the "jsontype_strings_optional" field.
func JsontypeStringsOptionalNotNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotNull(FieldJsontypeStringsOptional))
}
// JsontypeIntsOptionalIsNil applies the IsNil predicate on the "jsontype_ints_optional" field.
func JsontypeIntsOptionalIsNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldIsNull(FieldJsontypeIntsOptional))
}
// JsontypeIntsOptionalNotNil applies the NotNil predicate on the "jsontype_ints_optional" field.
func JsontypeIntsOptionalNotNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotNull(FieldJsontypeIntsOptional))
}
// RequiredEnumEQ applies the EQ predicate on the "required_enum" field.
func RequiredEnumEQ(v RequiredEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldRequiredEnum, v))
}
// RequiredEnumNEQ applies the NEQ predicate on the "required_enum" field.
func RequiredEnumNEQ(v RequiredEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldRequiredEnum, v))
}
// RequiredEnumIn applies the In predicate on the "required_enum" field.
func RequiredEnumIn(vs ...RequiredEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldIn(FieldRequiredEnum, vs...))
}
// RequiredEnumNotIn applies the NotIn predicate on the "required_enum" field.
func RequiredEnumNotIn(vs ...RequiredEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotIn(FieldRequiredEnum, vs...))
}
// OptionalNullableEnumEQ applies the EQ predicate on the "optional_nullable_enum" field.
func OptionalNullableEnumEQ(v OptionalNullableEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldOptionalNullableEnum, v))
}
// OptionalNullableEnumNEQ applies the NEQ predicate on the "optional_nullable_enum" field.
func OptionalNullableEnumNEQ(v OptionalNullableEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldOptionalNullableEnum, v))
}
// OptionalNullableEnumIn applies the In predicate on the "optional_nullable_enum" field.
func OptionalNullableEnumIn(vs ...OptionalNullableEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldIn(FieldOptionalNullableEnum, vs...))
}
// OptionalNullableEnumNotIn applies the NotIn predicate on the "optional_nullable_enum" field.
func OptionalNullableEnumNotIn(vs ...OptionalNullableEnum) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotIn(FieldOptionalNullableEnum, vs...))
}
// OptionalNullableEnumIsNil applies the IsNil predicate on the "optional_nullable_enum" field.
func OptionalNullableEnumIsNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldIsNull(FieldOptionalNullableEnum))
}
// OptionalNullableEnumNotNil applies the NotNil predicate on the "optional_nullable_enum" field.
func OptionalNullableEnumNotNil() predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotNull(FieldOptionalNullableEnum))
}
// BytesEQ applies the EQ predicate on the "bytes" field.
func BytesEQ(v []byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldEQ(FieldBytes, v))
}
// BytesNEQ applies the NEQ predicate on the "bytes" field.
func BytesNEQ(v []byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNEQ(FieldBytes, v))
}
// BytesIn applies the In predicate on the "bytes" field.
func BytesIn(vs ...[]byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldIn(FieldBytes, vs...))
}
// BytesNotIn applies the NotIn predicate on the "bytes" field.
func BytesNotIn(vs ...[]byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldNotIn(FieldBytes, vs...))
}
// BytesGT applies the GT predicate on the "bytes" field.
func BytesGT(v []byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGT(FieldBytes, v))
}
// BytesGTE applies the GTE predicate on the "bytes" field.
func BytesGTE(v []byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldGTE(FieldBytes, v))
}
// BytesLT applies the LT predicate on the "bytes" field.
func BytesLT(v []byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLT(FieldBytes, v))
}
// BytesLTE applies the LTE predicate on the "bytes" field.
func BytesLTE(v []byte) predicate.SchemaA {
return predicate.SchemaA(sql.FieldLTE(FieldBytes, v))
}
// HasEdgeSchemabUniqueRequired applies the HasEdge predicate on the "edge_schemab_unique_required" edge.
func HasEdgeSchemabUniqueRequired() predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, false, EdgeSchemabUniqueRequiredTable, EdgeSchemabUniqueRequiredColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasEdgeSchemabUniqueRequiredWith applies the HasEdge predicate on the "edge_schemab_unique_required" edge with a given conditions (other predicates).
func HasEdgeSchemabUniqueRequiredWith(preds ...predicate.SchemaB) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := newEdgeSchemabUniqueRequiredStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasEdgeSchemabUniqueRequiredBindtoBs applies the HasEdge predicate on the "edge_schemab_unique_required_bindto_bs" edge.
func HasEdgeSchemabUniqueRequiredBindtoBs() predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, false, EdgeSchemabUniqueRequiredBindtoBsTable, EdgeSchemabUniqueRequiredBindtoBsColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasEdgeSchemabUniqueRequiredBindtoBsWith applies the HasEdge predicate on the "edge_schemab_unique_required_bindto_bs" edge with a given conditions (other predicates).
func HasEdgeSchemabUniqueRequiredBindtoBsWith(preds ...predicate.SchemaB) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := newEdgeSchemabUniqueRequiredBindtoBsStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasEdgeSchemabUniqueOptional applies the HasEdge predicate on the "edge_schemab_unique_optional" edge.
func HasEdgeSchemabUniqueOptional() predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, false, EdgeSchemabUniqueOptionalTable, EdgeSchemabUniqueOptionalColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasEdgeSchemabUniqueOptionalWith applies the HasEdge predicate on the "edge_schemab_unique_optional" edge with a given conditions (other predicates).
func HasEdgeSchemabUniqueOptionalWith(preds ...predicate.SchemaB) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := newEdgeSchemabUniqueOptionalStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasEdgeSchemab applies the HasEdge predicate on the "edge_schemab" edge.
func HasEdgeSchemab() predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, EdgeSchemabTable, EdgeSchemabColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasEdgeSchemabWith applies the HasEdge predicate on the "edge_schemab" edge with a given conditions (other predicates).
func HasEdgeSchemabWith(preds ...predicate.SchemaB) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := newEdgeSchemabStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasEdgeSchemaaRecursive applies the HasEdge predicate on the "edge_schemaa_recursive" edge.
func HasEdgeSchemaaRecursive() predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2M, false, EdgeSchemaaRecursiveTable, EdgeSchemaaRecursivePrimaryKey...),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasEdgeSchemaaRecursiveWith applies the HasEdge predicate on the "edge_schemaa_recursive" edge with a given conditions (other predicates).
func HasEdgeSchemaaRecursiveWith(preds ...predicate.SchemaA) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
step := newEdgeSchemaaRecursiveStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.SchemaA) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
s1 := s.Clone().SetP(nil)
for _, p := range predicates {
p(s1)
}
s.Where(s1.P())
})
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.SchemaA) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
s1 := s.Clone().SetP(nil)
for i, p := range predicates {
if i > 0 {
s1.Or()
}
p(s1)
}
s.Where(s1.P())
})
}
// Not applies the not operator on the given predicate.
func Not(p predicate.SchemaA) predicate.SchemaA {
return predicate.SchemaA(func(s *sql.Selector) {
p(s.Not())
})
}