| 1 |
// Code generated by ent, DO NOT EDIT. |
| 2 |
|
| 3 |
package dsse |
| 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.Dsse { |
| 16 |
return predicate.Dsse(sql.FieldEQ(FieldID, id)) |
| 17 |
} |
| 18 |
|
| 19 |
// IDEQ applies the EQ predicate on the ID field. |
| 20 |
func IDEQ(id uuid.UUID) predicate.Dsse { |
| 21 |
return predicate.Dsse(sql.FieldEQ(FieldID, id)) |
| 22 |
} |
| 23 |
|
| 24 |
// IDNEQ applies the NEQ predicate on the ID field. |
| 25 |
func IDNEQ(id uuid.UUID) predicate.Dsse { |
| 26 |
return predicate.Dsse(sql.FieldNEQ(FieldID, id)) |
| 27 |
} |
| 28 |
|
| 29 |
// IDIn applies the In predicate on the ID field. |
| 30 |
func IDIn(ids ...uuid.UUID) predicate.Dsse { |
| 31 |
return predicate.Dsse(sql.FieldIn(FieldID, ids...)) |
| 32 |
} |
| 33 |
|
| 34 |
// IDNotIn applies the NotIn predicate on the ID field. |
| 35 |
func IDNotIn(ids ...uuid.UUID) predicate.Dsse { |
| 36 |
return predicate.Dsse(sql.FieldNotIn(FieldID, ids...)) |
| 37 |
} |
| 38 |
|
| 39 |
// IDGT applies the GT predicate on the ID field. |
| 40 |
func IDGT(id uuid.UUID) predicate.Dsse { |
| 41 |
return predicate.Dsse(sql.FieldGT(FieldID, id)) |
| 42 |
} |
| 43 |
|
| 44 |
// IDGTE applies the GTE predicate on the ID field. |
| 45 |
func IDGTE(id uuid.UUID) predicate.Dsse { |
| 46 |
return predicate.Dsse(sql.FieldGTE(FieldID, id)) |
| 47 |
} |
| 48 |
|
| 49 |
// IDLT applies the LT predicate on the ID field. |
| 50 |
func IDLT(id uuid.UUID) predicate.Dsse { |
| 51 |
return predicate.Dsse(sql.FieldLT(FieldID, id)) |
| 52 |
} |
| 53 |
|
| 54 |
// IDLTE applies the LTE predicate on the ID field. |
| 55 |
func IDLTE(id uuid.UUID) predicate.Dsse { |
| 56 |
return predicate.Dsse(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.Dsse { |
| 61 |
return predicate.Dsse(sql.FieldEQ(FieldCreatedAt, v)) |
| 62 |
} |
| 63 |
|
| 64 |
// GitoidSha256 applies equality check predicate on the "gitoid_sha256" field. It's identical to GitoidSha256EQ. |
| 65 |
func GitoidSha256(v string) predicate.Dsse { |
| 66 |
return predicate.Dsse(sql.FieldEQ(FieldGitoidSha256, v)) |
| 67 |
} |
| 68 |
|
| 69 |
// PayloadType applies equality check predicate on the "payload_type" field. It's identical to PayloadTypeEQ. |
| 70 |
func PayloadType(v string) predicate.Dsse { |
| 71 |
return predicate.Dsse(sql.FieldEQ(FieldPayloadType, v)) |
| 72 |
} |
| 73 |
|
| 74 |
// CreatedAtEQ applies the EQ predicate on the "created_at" field. |
| 75 |
func CreatedAtEQ(v time.Time) predicate.Dsse { |
| 76 |
return predicate.Dsse(sql.FieldEQ(FieldCreatedAt, v)) |
| 77 |
} |
| 78 |
|
| 79 |
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. |
| 80 |
func CreatedAtNEQ(v time.Time) predicate.Dsse { |
| 81 |
return predicate.Dsse(sql.FieldNEQ(FieldCreatedAt, v)) |
| 82 |
} |
| 83 |
|
| 84 |
// CreatedAtIn applies the In predicate on the "created_at" field. |
| 85 |
func CreatedAtIn(vs ...time.Time) predicate.Dsse { |
| 86 |
return predicate.Dsse(sql.FieldIn(FieldCreatedAt, vs...)) |
| 87 |
} |
| 88 |
|
| 89 |
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. |
| 90 |
func CreatedAtNotIn(vs ...time.Time) predicate.Dsse { |
| 91 |
return predicate.Dsse(sql.FieldNotIn(FieldCreatedAt, vs...)) |
| 92 |
} |
| 93 |
|
| 94 |
// CreatedAtGT applies the GT predicate on the "created_at" field. |
| 95 |
func CreatedAtGT(v time.Time) predicate.Dsse { |
| 96 |
return predicate.Dsse(sql.FieldGT(FieldCreatedAt, v)) |
| 97 |
} |
| 98 |
|
| 99 |
// CreatedAtGTE applies the GTE predicate on the "created_at" field. |
| 100 |
func CreatedAtGTE(v time.Time) predicate.Dsse { |
| 101 |
return predicate.Dsse(sql.FieldGTE(FieldCreatedAt, v)) |
| 102 |
} |
| 103 |
|
| 104 |
// CreatedAtLT applies the LT predicate on the "created_at" field. |
| 105 |
func CreatedAtLT(v time.Time) predicate.Dsse { |
| 106 |
return predicate.Dsse(sql.FieldLT(FieldCreatedAt, v)) |
| 107 |
} |
| 108 |
|
| 109 |
// CreatedAtLTE applies the LTE predicate on the "created_at" field. |
| 110 |
func CreatedAtLTE(v time.Time) predicate.Dsse { |
| 111 |
return predicate.Dsse(sql.FieldLTE(FieldCreatedAt, v)) |
| 112 |
} |
| 113 |
|
| 114 |
// CreatedAtIsNil applies the IsNil predicate on the "created_at" field. |
| 115 |
func CreatedAtIsNil() predicate.Dsse { |
| 116 |
return predicate.Dsse(sql.FieldIsNull(FieldCreatedAt)) |
| 117 |
} |
| 118 |
|
| 119 |
// CreatedAtNotNil applies the NotNil predicate on the "created_at" field. |
| 120 |
func CreatedAtNotNil() predicate.Dsse { |
| 121 |
return predicate.Dsse(sql.FieldNotNull(FieldCreatedAt)) |
| 122 |
} |
| 123 |
|
| 124 |
// GitoidSha256EQ applies the EQ predicate on the "gitoid_sha256" field. |
| 125 |
func GitoidSha256EQ(v string) predicate.Dsse { |
| 126 |
return predicate.Dsse(sql.FieldEQ(FieldGitoidSha256, v)) |
| 127 |
} |
| 128 |
|
| 129 |
// GitoidSha256NEQ applies the NEQ predicate on the "gitoid_sha256" field. |
| 130 |
func GitoidSha256NEQ(v string) predicate.Dsse { |
| 131 |
return predicate.Dsse(sql.FieldNEQ(FieldGitoidSha256, v)) |
| 132 |
} |
| 133 |
|
| 134 |
// GitoidSha256In applies the In predicate on the "gitoid_sha256" field. |
| 135 |
func GitoidSha256In(vs ...string) predicate.Dsse { |
| 136 |
return predicate.Dsse(sql.FieldIn(FieldGitoidSha256, vs...)) |
| 137 |
} |
| 138 |
|
| 139 |
// GitoidSha256NotIn applies the NotIn predicate on the "gitoid_sha256" field. |
| 140 |
func GitoidSha256NotIn(vs ...string) predicate.Dsse { |
| 141 |
return predicate.Dsse(sql.FieldNotIn(FieldGitoidSha256, vs...)) |
| 142 |
} |
| 143 |
|
| 144 |
// GitoidSha256GT applies the GT predicate on the "gitoid_sha256" field. |
| 145 |
func GitoidSha256GT(v string) predicate.Dsse { |
| 146 |
return predicate.Dsse(sql.FieldGT(FieldGitoidSha256, v)) |
| 147 |
} |
| 148 |
|
| 149 |
// GitoidSha256GTE applies the GTE predicate on the "gitoid_sha256" field. |
| 150 |
func GitoidSha256GTE(v string) predicate.Dsse { |
| 151 |
return predicate.Dsse(sql.FieldGTE(FieldGitoidSha256, v)) |
| 152 |
} |
| 153 |
|
| 154 |
// GitoidSha256LT applies the LT predicate on the "gitoid_sha256" field. |
| 155 |
func GitoidSha256LT(v string) predicate.Dsse { |
| 156 |
return predicate.Dsse(sql.FieldLT(FieldGitoidSha256, v)) |
| 157 |
} |
| 158 |
|
| 159 |
// GitoidSha256LTE applies the LTE predicate on the "gitoid_sha256" field. |
| 160 |
func GitoidSha256LTE(v string) predicate.Dsse { |
| 161 |
return predicate.Dsse(sql.FieldLTE(FieldGitoidSha256, v)) |
| 162 |
} |
| 163 |
|
| 164 |
// GitoidSha256Contains applies the Contains predicate on the "gitoid_sha256" field. |
| 165 |
func GitoidSha256Contains(v string) predicate.Dsse { |
| 166 |
return predicate.Dsse(sql.FieldContains(FieldGitoidSha256, v)) |
| 167 |
} |
| 168 |
|
| 169 |
// GitoidSha256HasPrefix applies the HasPrefix predicate on the "gitoid_sha256" field. |
| 170 |
func GitoidSha256HasPrefix(v string) predicate.Dsse { |
| 171 |
return predicate.Dsse(sql.FieldHasPrefix(FieldGitoidSha256, v)) |
| 172 |
} |
| 173 |
|
| 174 |
// GitoidSha256HasSuffix applies the HasSuffix predicate on the "gitoid_sha256" field. |
| 175 |
func GitoidSha256HasSuffix(v string) predicate.Dsse { |
| 176 |
return predicate.Dsse(sql.FieldHasSuffix(FieldGitoidSha256, v)) |
| 177 |
} |
| 178 |
|
| 179 |
// GitoidSha256EqualFold applies the EqualFold predicate on the "gitoid_sha256" field. |
| 180 |
func GitoidSha256EqualFold(v string) predicate.Dsse { |
| 181 |
return predicate.Dsse(sql.FieldEqualFold(FieldGitoidSha256, v)) |
| 182 |
} |
| 183 |
|
| 184 |
// GitoidSha256ContainsFold applies the ContainsFold predicate on the "gitoid_sha256" field. |
| 185 |
func GitoidSha256ContainsFold(v string) predicate.Dsse { |
| 186 |
return predicate.Dsse(sql.FieldContainsFold(FieldGitoidSha256, v)) |
| 187 |
} |
| 188 |
|
| 189 |
// PayloadTypeEQ applies the EQ predicate on the "payload_type" field. |
| 190 |
func PayloadTypeEQ(v string) predicate.Dsse { |
| 191 |
return predicate.Dsse(sql.FieldEQ(FieldPayloadType, v)) |
| 192 |
} |
| 193 |
|
| 194 |
// PayloadTypeNEQ applies the NEQ predicate on the "payload_type" field. |
| 195 |
func PayloadTypeNEQ(v string) predicate.Dsse { |
| 196 |
return predicate.Dsse(sql.FieldNEQ(FieldPayloadType, v)) |
| 197 |
} |
| 198 |
|
| 199 |
// PayloadTypeIn applies the In predicate on the "payload_type" field. |
| 200 |
func PayloadTypeIn(vs ...string) predicate.Dsse { |
| 201 |
return predicate.Dsse(sql.FieldIn(FieldPayloadType, vs...)) |
| 202 |
} |
| 203 |
|
| 204 |
// PayloadTypeNotIn applies the NotIn predicate on the "payload_type" field. |
| 205 |
func PayloadTypeNotIn(vs ...string) predicate.Dsse { |
| 206 |
return predicate.Dsse(sql.FieldNotIn(FieldPayloadType, vs...)) |
| 207 |
} |
| 208 |
|
| 209 |
// PayloadTypeGT applies the GT predicate on the "payload_type" field. |
| 210 |
func PayloadTypeGT(v string) predicate.Dsse { |
| 211 |
return predicate.Dsse(sql.FieldGT(FieldPayloadType, v)) |
| 212 |
} |
| 213 |
|
| 214 |
// PayloadTypeGTE applies the GTE predicate on the "payload_type" field. |
| 215 |
func PayloadTypeGTE(v string) predicate.Dsse { |
| 216 |
return predicate.Dsse(sql.FieldGTE(FieldPayloadType, v)) |
| 217 |
} |
| 218 |
|
| 219 |
// PayloadTypeLT applies the LT predicate on the "payload_type" field. |
| 220 |
func PayloadTypeLT(v string) predicate.Dsse { |
| 221 |
return predicate.Dsse(sql.FieldLT(FieldPayloadType, v)) |
| 222 |
} |
| 223 |
|
| 224 |
// PayloadTypeLTE applies the LTE predicate on the "payload_type" field. |
| 225 |
func PayloadTypeLTE(v string) predicate.Dsse { |
| 226 |
return predicate.Dsse(sql.FieldLTE(FieldPayloadType, v)) |
| 227 |
} |
| 228 |
|
| 229 |
// PayloadTypeContains applies the Contains predicate on the "payload_type" field. |
| 230 |
func PayloadTypeContains(v string) predicate.Dsse { |
| 231 |
return predicate.Dsse(sql.FieldContains(FieldPayloadType, v)) |
| 232 |
} |
| 233 |
|
| 234 |
// PayloadTypeHasPrefix applies the HasPrefix predicate on the "payload_type" field. |
| 235 |
func PayloadTypeHasPrefix(v string) predicate.Dsse { |
| 236 |
return predicate.Dsse(sql.FieldHasPrefix(FieldPayloadType, v)) |
| 237 |
} |
| 238 |
|
| 239 |
// PayloadTypeHasSuffix applies the HasSuffix predicate on the "payload_type" field. |
| 240 |
func PayloadTypeHasSuffix(v string) predicate.Dsse { |
| 241 |
return predicate.Dsse(sql.FieldHasSuffix(FieldPayloadType, v)) |
| 242 |
} |
| 243 |
|
| 244 |
// PayloadTypeEqualFold applies the EqualFold predicate on the "payload_type" field. |
| 245 |
func PayloadTypeEqualFold(v string) predicate.Dsse { |
| 246 |
return predicate.Dsse(sql.FieldEqualFold(FieldPayloadType, v)) |
| 247 |
} |
| 248 |
|
| 249 |
// PayloadTypeContainsFold applies the ContainsFold predicate on the "payload_type" field. |
| 250 |
func PayloadTypeContainsFold(v string) predicate.Dsse { |
| 251 |
return predicate.Dsse(sql.FieldContainsFold(FieldPayloadType, v)) |
| 252 |
} |
| 253 |
|
| 254 |
// HasStatement applies the HasEdge predicate on the "statement" edge. |
| 255 |
func HasStatement() predicate.Dsse { |
| 256 |
return predicate.Dsse(func(s *sql.Selector) { |
| 257 |
step := sqlgraph.NewStep( |
| 258 |
sqlgraph.From(Table, FieldID), |
| 259 |
sqlgraph.Edge(sqlgraph.M2O, false, StatementTable, StatementColumn), |
| 260 |
) |
| 261 |
sqlgraph.HasNeighbors(s, step) |
| 262 |
}) |
| 263 |
} |
| 264 |
|
| 265 |
// HasStatementWith applies the HasEdge predicate on the "statement" edge with a given conditions (other predicates). |
| 266 |
func HasStatementWith(preds ...predicate.Statement) predicate.Dsse { |
| 267 |
return predicate.Dsse(func(s *sql.Selector) { |
| 268 |
step := newStatementStep() |
| 269 |
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { |
| 270 |
for _, p := range preds { |
| 271 |
p(s) |
| 272 |
} |
| 273 |
}) |
| 274 |
}) |
| 275 |
} |
| 276 |
|
| 277 |
// HasSignatures applies the HasEdge predicate on the "signatures" edge. |
| 278 |
func HasSignatures() predicate.Dsse { |
| 279 |
return predicate.Dsse(func(s *sql.Selector) { |
| 280 |
step := sqlgraph.NewStep( |
| 281 |
sqlgraph.From(Table, FieldID), |
| 282 |
sqlgraph.Edge(sqlgraph.O2M, false, SignaturesTable, SignaturesColumn), |
| 283 |
) |
| 284 |
sqlgraph.HasNeighbors(s, step) |
| 285 |
}) |
| 286 |
} |
| 287 |
|
| 288 |
// HasSignaturesWith applies the HasEdge predicate on the "signatures" edge with a given conditions (other predicates). |
| 289 |
func HasSignaturesWith(preds ...predicate.Signature) predicate.Dsse { |
| 290 |
return predicate.Dsse(func(s *sql.Selector) { |
| 291 |
step := newSignaturesStep() |
| 292 |
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { |
| 293 |
for _, p := range preds { |
| 294 |
p(s) |
| 295 |
} |
| 296 |
}) |
| 297 |
}) |
| 298 |
} |
| 299 |
|
| 300 |
// HasPayloadDigests applies the HasEdge predicate on the "payload_digests" edge. |
| 301 |
func HasPayloadDigests() predicate.Dsse { |
| 302 |
return predicate.Dsse(func(s *sql.Selector) { |
| 303 |
step := sqlgraph.NewStep( |
| 304 |
sqlgraph.From(Table, FieldID), |
| 305 |
sqlgraph.Edge(sqlgraph.O2M, false, PayloadDigestsTable, PayloadDigestsColumn), |
| 306 |
) |
| 307 |
sqlgraph.HasNeighbors(s, step) |
| 308 |
}) |
| 309 |
} |
| 310 |
|
| 311 |
// HasPayloadDigestsWith applies the HasEdge predicate on the "payload_digests" edge with a given conditions (other predicates). |
| 312 |
func HasPayloadDigestsWith(preds ...predicate.PayloadDigest) predicate.Dsse { |
| 313 |
return predicate.Dsse(func(s *sql.Selector) { |
| 314 |
step := newPayloadDigestsStep() |
| 315 |
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { |
| 316 |
for _, p := range preds { |
| 317 |
p(s) |
| 318 |
} |
| 319 |
}) |
| 320 |
}) |
| 321 |
} |
| 322 |
|
| 323 |
// And groups predicates with the AND operator between them. |
| 324 |
func And(predicates ...predicate.Dsse) predicate.Dsse { |
| 325 |
return predicate.Dsse(sql.AndPredicates(predicates...)) |
| 326 |
} |
| 327 |
|
| 328 |
// Or groups predicates with the OR operator between them. |
| 329 |
func Or(predicates ...predicate.Dsse) predicate.Dsse { |
| 330 |
return predicate.Dsse(sql.OrPredicates(predicates...)) |
| 331 |
} |
| 332 |
|
| 333 |
// Not applies the not operator on the given predicate. |
| 334 |
func Not(p predicate.Dsse) predicate.Dsse { |
| 335 |
return predicate.Dsse(sql.NotPredicates(p)) |
| 336 |
} |