Debian Codegraph @

ent/attestation/where.go

raw
1 // Code generated by ent, DO NOT EDIT.
2
3 package attestation
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.Attestation {
14 return predicate.Attestation(sql.FieldEQ(FieldID, id))
15 }
16
17 // IDEQ applies the EQ predicate on the ID field.
18 func IDEQ(id uuid.UUID) predicate.Attestation {
19 return predicate.Attestation(sql.FieldEQ(FieldID, id))
20 }
21
22 // IDNEQ applies the NEQ predicate on the ID field.
23 func IDNEQ(id uuid.UUID) predicate.Attestation {
24 return predicate.Attestation(sql.FieldNEQ(FieldID, id))
25 }
26
27 // IDIn applies the In predicate on the ID field.
28 func IDIn(ids ...uuid.UUID) predicate.Attestation {
29 return predicate.Attestation(sql.FieldIn(FieldID, ids...))
30 }
31
32 // IDNotIn applies the NotIn predicate on the ID field.
33 func IDNotIn(ids ...uuid.UUID) predicate.Attestation {
34 return predicate.Attestation(sql.FieldNotIn(FieldID, ids...))
35 }
36
37 // IDGT applies the GT predicate on the ID field.
38 func IDGT(id uuid.UUID) predicate.Attestation {
39 return predicate.Attestation(sql.FieldGT(FieldID, id))
40 }
41
42 // IDGTE applies the GTE predicate on the ID field.
43 func IDGTE(id uuid.UUID) predicate.Attestation {
44 return predicate.Attestation(sql.FieldGTE(FieldID, id))
45 }
46
47 // IDLT applies the LT predicate on the ID field.
48 func IDLT(id uuid.UUID) predicate.Attestation {
49 return predicate.Attestation(sql.FieldLT(FieldID, id))
50 }
51
52 // IDLTE applies the LTE predicate on the ID field.
53 func IDLTE(id uuid.UUID) predicate.Attestation {
54 return predicate.Attestation(sql.FieldLTE(FieldID, id))
55 }
56
57 // Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
58 func Type(v string) predicate.Attestation {
59 return predicate.Attestation(sql.FieldEQ(FieldType, v))
60 }
61
62 // TypeEQ applies the EQ predicate on the "type" field.
63 func TypeEQ(v string) predicate.Attestation {
64 return predicate.Attestation(sql.FieldEQ(FieldType, v))
65 }
66
67 // TypeNEQ applies the NEQ predicate on the "type" field.
68 func TypeNEQ(v string) predicate.Attestation {
69 return predicate.Attestation(sql.FieldNEQ(FieldType, v))
70 }
71
72 // TypeIn applies the In predicate on the "type" field.
73 func TypeIn(vs ...string) predicate.Attestation {
74 return predicate.Attestation(sql.FieldIn(FieldType, vs...))
75 }
76
77 // TypeNotIn applies the NotIn predicate on the "type" field.
78 func TypeNotIn(vs ...string) predicate.Attestation {
79 return predicate.Attestation(sql.FieldNotIn(FieldType, vs...))
80 }
81
82 // TypeGT applies the GT predicate on the "type" field.
83 func TypeGT(v string) predicate.Attestation {
84 return predicate.Attestation(sql.FieldGT(FieldType, v))
85 }
86
87 // TypeGTE applies the GTE predicate on the "type" field.
88 func TypeGTE(v string) predicate.Attestation {
89 return predicate.Attestation(sql.FieldGTE(FieldType, v))
90 }
91
92 // TypeLT applies the LT predicate on the "type" field.
93 func TypeLT(v string) predicate.Attestation {
94 return predicate.Attestation(sql.FieldLT(FieldType, v))
95 }
96
97 // TypeLTE applies the LTE predicate on the "type" field.
98 func TypeLTE(v string) predicate.Attestation {
99 return predicate.Attestation(sql.FieldLTE(FieldType, v))
100 }
101
102 // TypeContains applies the Contains predicate on the "type" field.
103 func TypeContains(v string) predicate.Attestation {
104 return predicate.Attestation(sql.FieldContains(FieldType, v))
105 }
106
107 // TypeHasPrefix applies the HasPrefix predicate on the "type" field.
108 func TypeHasPrefix(v string) predicate.Attestation {
109 return predicate.Attestation(sql.FieldHasPrefix(FieldType, v))
110 }
111
112 // TypeHasSuffix applies the HasSuffix predicate on the "type" field.
113 func TypeHasSuffix(v string) predicate.Attestation {
114 return predicate.Attestation(sql.FieldHasSuffix(FieldType, v))
115 }
116
117 // TypeEqualFold applies the EqualFold predicate on the "type" field.
118 func TypeEqualFold(v string) predicate.Attestation {
119 return predicate.Attestation(sql.FieldEqualFold(FieldType, v))
120 }
121
122 // TypeContainsFold applies the ContainsFold predicate on the "type" field.
123 func TypeContainsFold(v string) predicate.Attestation {
124 return predicate.Attestation(sql.FieldContainsFold(FieldType, v))
125 }
126
127 // HasAttestationCollection applies the HasEdge predicate on the "attestation_collection" edge.
128 func HasAttestationCollection() predicate.Attestation {
129 return predicate.Attestation(func(s *sql.Selector) {
130 step := sqlgraph.NewStep(
131 sqlgraph.From(Table, FieldID),
132 sqlgraph.Edge(sqlgraph.M2O, true, AttestationCollectionTable, AttestationCollectionColumn),
133 )
134 sqlgraph.HasNeighbors(s, step)
135 })
136 }
137
138 // HasAttestationCollectionWith applies the HasEdge predicate on the "attestation_collection" edge with a given conditions (other predicates).
139 func HasAttestationCollectionWith(preds ...predicate.AttestationCollection) predicate.Attestation {
140 return predicate.Attestation(func(s *sql.Selector) {
141 step := newAttestationCollectionStep()
142 sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
143 for _, p := range preds {
144 p(s)
145 }
146 })
147 })
148 }
149
150 // And groups predicates with the AND operator between them.
151 func And(predicates ...predicate.Attestation) predicate.Attestation {
152 return predicate.Attestation(sql.AndPredicates(predicates...))
153 }
154
155 // Or groups predicates with the OR operator between them.
156 func Or(predicates ...predicate.Attestation) predicate.Attestation {
157 return predicate.Attestation(sql.OrPredicates(predicates...))
158 }
159
160 // Not applies the not operator on the given predicate.
161 func Not(p predicate.Attestation) predicate.Attestation {
162 return predicate.Attestation(sql.NotPredicates(p))
163 }