github.com/NpoolPlatform/chain-middleware@v0.0.0-20240228100535-eb1bcf896eb9/pkg/db/ent/coinusedfor/where.go (about) 1 // Code generated by ent, DO NOT EDIT. 2 3 package coinusedfor 4 5 import ( 6 "entgo.io/ent/dialect/sql" 7 "github.com/NpoolPlatform/chain-middleware/pkg/db/ent/predicate" 8 "github.com/google/uuid" 9 ) 10 11 // ID filters vertices based on their ID field. 12 func ID(id uint32) predicate.CoinUsedFor { 13 return predicate.CoinUsedFor(func(s *sql.Selector) { 14 s.Where(sql.EQ(s.C(FieldID), id)) 15 }) 16 } 17 18 // IDEQ applies the EQ predicate on the ID field. 19 func IDEQ(id uint32) predicate.CoinUsedFor { 20 return predicate.CoinUsedFor(func(s *sql.Selector) { 21 s.Where(sql.EQ(s.C(FieldID), id)) 22 }) 23 } 24 25 // IDNEQ applies the NEQ predicate on the ID field. 26 func IDNEQ(id uint32) predicate.CoinUsedFor { 27 return predicate.CoinUsedFor(func(s *sql.Selector) { 28 s.Where(sql.NEQ(s.C(FieldID), id)) 29 }) 30 } 31 32 // IDIn applies the In predicate on the ID field. 33 func IDIn(ids ...uint32) predicate.CoinUsedFor { 34 return predicate.CoinUsedFor(func(s *sql.Selector) { 35 v := make([]interface{}, len(ids)) 36 for i := range v { 37 v[i] = ids[i] 38 } 39 s.Where(sql.In(s.C(FieldID), v...)) 40 }) 41 } 42 43 // IDNotIn applies the NotIn predicate on the ID field. 44 func IDNotIn(ids ...uint32) predicate.CoinUsedFor { 45 return predicate.CoinUsedFor(func(s *sql.Selector) { 46 v := make([]interface{}, len(ids)) 47 for i := range v { 48 v[i] = ids[i] 49 } 50 s.Where(sql.NotIn(s.C(FieldID), v...)) 51 }) 52 } 53 54 // IDGT applies the GT predicate on the ID field. 55 func IDGT(id uint32) predicate.CoinUsedFor { 56 return predicate.CoinUsedFor(func(s *sql.Selector) { 57 s.Where(sql.GT(s.C(FieldID), id)) 58 }) 59 } 60 61 // IDGTE applies the GTE predicate on the ID field. 62 func IDGTE(id uint32) predicate.CoinUsedFor { 63 return predicate.CoinUsedFor(func(s *sql.Selector) { 64 s.Where(sql.GTE(s.C(FieldID), id)) 65 }) 66 } 67 68 // IDLT applies the LT predicate on the ID field. 69 func IDLT(id uint32) predicate.CoinUsedFor { 70 return predicate.CoinUsedFor(func(s *sql.Selector) { 71 s.Where(sql.LT(s.C(FieldID), id)) 72 }) 73 } 74 75 // IDLTE applies the LTE predicate on the ID field. 76 func IDLTE(id uint32) predicate.CoinUsedFor { 77 return predicate.CoinUsedFor(func(s *sql.Selector) { 78 s.Where(sql.LTE(s.C(FieldID), id)) 79 }) 80 } 81 82 // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. 83 func CreatedAt(v uint32) predicate.CoinUsedFor { 84 return predicate.CoinUsedFor(func(s *sql.Selector) { 85 s.Where(sql.EQ(s.C(FieldCreatedAt), v)) 86 }) 87 } 88 89 // UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ. 90 func UpdatedAt(v uint32) predicate.CoinUsedFor { 91 return predicate.CoinUsedFor(func(s *sql.Selector) { 92 s.Where(sql.EQ(s.C(FieldUpdatedAt), v)) 93 }) 94 } 95 96 // DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ. 97 func DeletedAt(v uint32) predicate.CoinUsedFor { 98 return predicate.CoinUsedFor(func(s *sql.Selector) { 99 s.Where(sql.EQ(s.C(FieldDeletedAt), v)) 100 }) 101 } 102 103 // EntID applies equality check predicate on the "ent_id" field. It's identical to EntIDEQ. 104 func EntID(v uuid.UUID) predicate.CoinUsedFor { 105 return predicate.CoinUsedFor(func(s *sql.Selector) { 106 s.Where(sql.EQ(s.C(FieldEntID), v)) 107 }) 108 } 109 110 // CoinTypeID applies equality check predicate on the "coin_type_id" field. It's identical to CoinTypeIDEQ. 111 func CoinTypeID(v uuid.UUID) predicate.CoinUsedFor { 112 return predicate.CoinUsedFor(func(s *sql.Selector) { 113 s.Where(sql.EQ(s.C(FieldCoinTypeID), v)) 114 }) 115 } 116 117 // UsedFor applies equality check predicate on the "used_for" field. It's identical to UsedForEQ. 118 func UsedFor(v string) predicate.CoinUsedFor { 119 return predicate.CoinUsedFor(func(s *sql.Selector) { 120 s.Where(sql.EQ(s.C(FieldUsedFor), v)) 121 }) 122 } 123 124 // Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ. 125 func Priority(v uint32) predicate.CoinUsedFor { 126 return predicate.CoinUsedFor(func(s *sql.Selector) { 127 s.Where(sql.EQ(s.C(FieldPriority), v)) 128 }) 129 } 130 131 // CreatedAtEQ applies the EQ predicate on the "created_at" field. 132 func CreatedAtEQ(v uint32) predicate.CoinUsedFor { 133 return predicate.CoinUsedFor(func(s *sql.Selector) { 134 s.Where(sql.EQ(s.C(FieldCreatedAt), v)) 135 }) 136 } 137 138 // CreatedAtNEQ applies the NEQ predicate on the "created_at" field. 139 func CreatedAtNEQ(v uint32) predicate.CoinUsedFor { 140 return predicate.CoinUsedFor(func(s *sql.Selector) { 141 s.Where(sql.NEQ(s.C(FieldCreatedAt), v)) 142 }) 143 } 144 145 // CreatedAtIn applies the In predicate on the "created_at" field. 146 func CreatedAtIn(vs ...uint32) predicate.CoinUsedFor { 147 v := make([]interface{}, len(vs)) 148 for i := range v { 149 v[i] = vs[i] 150 } 151 return predicate.CoinUsedFor(func(s *sql.Selector) { 152 s.Where(sql.In(s.C(FieldCreatedAt), v...)) 153 }) 154 } 155 156 // CreatedAtNotIn applies the NotIn predicate on the "created_at" field. 157 func CreatedAtNotIn(vs ...uint32) predicate.CoinUsedFor { 158 v := make([]interface{}, len(vs)) 159 for i := range v { 160 v[i] = vs[i] 161 } 162 return predicate.CoinUsedFor(func(s *sql.Selector) { 163 s.Where(sql.NotIn(s.C(FieldCreatedAt), v...)) 164 }) 165 } 166 167 // CreatedAtGT applies the GT predicate on the "created_at" field. 168 func CreatedAtGT(v uint32) predicate.CoinUsedFor { 169 return predicate.CoinUsedFor(func(s *sql.Selector) { 170 s.Where(sql.GT(s.C(FieldCreatedAt), v)) 171 }) 172 } 173 174 // CreatedAtGTE applies the GTE predicate on the "created_at" field. 175 func CreatedAtGTE(v uint32) predicate.CoinUsedFor { 176 return predicate.CoinUsedFor(func(s *sql.Selector) { 177 s.Where(sql.GTE(s.C(FieldCreatedAt), v)) 178 }) 179 } 180 181 // CreatedAtLT applies the LT predicate on the "created_at" field. 182 func CreatedAtLT(v uint32) predicate.CoinUsedFor { 183 return predicate.CoinUsedFor(func(s *sql.Selector) { 184 s.Where(sql.LT(s.C(FieldCreatedAt), v)) 185 }) 186 } 187 188 // CreatedAtLTE applies the LTE predicate on the "created_at" field. 189 func CreatedAtLTE(v uint32) predicate.CoinUsedFor { 190 return predicate.CoinUsedFor(func(s *sql.Selector) { 191 s.Where(sql.LTE(s.C(FieldCreatedAt), v)) 192 }) 193 } 194 195 // UpdatedAtEQ applies the EQ predicate on the "updated_at" field. 196 func UpdatedAtEQ(v uint32) predicate.CoinUsedFor { 197 return predicate.CoinUsedFor(func(s *sql.Selector) { 198 s.Where(sql.EQ(s.C(FieldUpdatedAt), v)) 199 }) 200 } 201 202 // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. 203 func UpdatedAtNEQ(v uint32) predicate.CoinUsedFor { 204 return predicate.CoinUsedFor(func(s *sql.Selector) { 205 s.Where(sql.NEQ(s.C(FieldUpdatedAt), v)) 206 }) 207 } 208 209 // UpdatedAtIn applies the In predicate on the "updated_at" field. 210 func UpdatedAtIn(vs ...uint32) predicate.CoinUsedFor { 211 v := make([]interface{}, len(vs)) 212 for i := range v { 213 v[i] = vs[i] 214 } 215 return predicate.CoinUsedFor(func(s *sql.Selector) { 216 s.Where(sql.In(s.C(FieldUpdatedAt), v...)) 217 }) 218 } 219 220 // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. 221 func UpdatedAtNotIn(vs ...uint32) predicate.CoinUsedFor { 222 v := make([]interface{}, len(vs)) 223 for i := range v { 224 v[i] = vs[i] 225 } 226 return predicate.CoinUsedFor(func(s *sql.Selector) { 227 s.Where(sql.NotIn(s.C(FieldUpdatedAt), v...)) 228 }) 229 } 230 231 // UpdatedAtGT applies the GT predicate on the "updated_at" field. 232 func UpdatedAtGT(v uint32) predicate.CoinUsedFor { 233 return predicate.CoinUsedFor(func(s *sql.Selector) { 234 s.Where(sql.GT(s.C(FieldUpdatedAt), v)) 235 }) 236 } 237 238 // UpdatedAtGTE applies the GTE predicate on the "updated_at" field. 239 func UpdatedAtGTE(v uint32) predicate.CoinUsedFor { 240 return predicate.CoinUsedFor(func(s *sql.Selector) { 241 s.Where(sql.GTE(s.C(FieldUpdatedAt), v)) 242 }) 243 } 244 245 // UpdatedAtLT applies the LT predicate on the "updated_at" field. 246 func UpdatedAtLT(v uint32) predicate.CoinUsedFor { 247 return predicate.CoinUsedFor(func(s *sql.Selector) { 248 s.Where(sql.LT(s.C(FieldUpdatedAt), v)) 249 }) 250 } 251 252 // UpdatedAtLTE applies the LTE predicate on the "updated_at" field. 253 func UpdatedAtLTE(v uint32) predicate.CoinUsedFor { 254 return predicate.CoinUsedFor(func(s *sql.Selector) { 255 s.Where(sql.LTE(s.C(FieldUpdatedAt), v)) 256 }) 257 } 258 259 // DeletedAtEQ applies the EQ predicate on the "deleted_at" field. 260 func DeletedAtEQ(v uint32) predicate.CoinUsedFor { 261 return predicate.CoinUsedFor(func(s *sql.Selector) { 262 s.Where(sql.EQ(s.C(FieldDeletedAt), v)) 263 }) 264 } 265 266 // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field. 267 func DeletedAtNEQ(v uint32) predicate.CoinUsedFor { 268 return predicate.CoinUsedFor(func(s *sql.Selector) { 269 s.Where(sql.NEQ(s.C(FieldDeletedAt), v)) 270 }) 271 } 272 273 // DeletedAtIn applies the In predicate on the "deleted_at" field. 274 func DeletedAtIn(vs ...uint32) predicate.CoinUsedFor { 275 v := make([]interface{}, len(vs)) 276 for i := range v { 277 v[i] = vs[i] 278 } 279 return predicate.CoinUsedFor(func(s *sql.Selector) { 280 s.Where(sql.In(s.C(FieldDeletedAt), v...)) 281 }) 282 } 283 284 // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field. 285 func DeletedAtNotIn(vs ...uint32) predicate.CoinUsedFor { 286 v := make([]interface{}, len(vs)) 287 for i := range v { 288 v[i] = vs[i] 289 } 290 return predicate.CoinUsedFor(func(s *sql.Selector) { 291 s.Where(sql.NotIn(s.C(FieldDeletedAt), v...)) 292 }) 293 } 294 295 // DeletedAtGT applies the GT predicate on the "deleted_at" field. 296 func DeletedAtGT(v uint32) predicate.CoinUsedFor { 297 return predicate.CoinUsedFor(func(s *sql.Selector) { 298 s.Where(sql.GT(s.C(FieldDeletedAt), v)) 299 }) 300 } 301 302 // DeletedAtGTE applies the GTE predicate on the "deleted_at" field. 303 func DeletedAtGTE(v uint32) predicate.CoinUsedFor { 304 return predicate.CoinUsedFor(func(s *sql.Selector) { 305 s.Where(sql.GTE(s.C(FieldDeletedAt), v)) 306 }) 307 } 308 309 // DeletedAtLT applies the LT predicate on the "deleted_at" field. 310 func DeletedAtLT(v uint32) predicate.CoinUsedFor { 311 return predicate.CoinUsedFor(func(s *sql.Selector) { 312 s.Where(sql.LT(s.C(FieldDeletedAt), v)) 313 }) 314 } 315 316 // DeletedAtLTE applies the LTE predicate on the "deleted_at" field. 317 func DeletedAtLTE(v uint32) predicate.CoinUsedFor { 318 return predicate.CoinUsedFor(func(s *sql.Selector) { 319 s.Where(sql.LTE(s.C(FieldDeletedAt), v)) 320 }) 321 } 322 323 // EntIDEQ applies the EQ predicate on the "ent_id" field. 324 func EntIDEQ(v uuid.UUID) predicate.CoinUsedFor { 325 return predicate.CoinUsedFor(func(s *sql.Selector) { 326 s.Where(sql.EQ(s.C(FieldEntID), v)) 327 }) 328 } 329 330 // EntIDNEQ applies the NEQ predicate on the "ent_id" field. 331 func EntIDNEQ(v uuid.UUID) predicate.CoinUsedFor { 332 return predicate.CoinUsedFor(func(s *sql.Selector) { 333 s.Where(sql.NEQ(s.C(FieldEntID), v)) 334 }) 335 } 336 337 // EntIDIn applies the In predicate on the "ent_id" field. 338 func EntIDIn(vs ...uuid.UUID) predicate.CoinUsedFor { 339 v := make([]interface{}, len(vs)) 340 for i := range v { 341 v[i] = vs[i] 342 } 343 return predicate.CoinUsedFor(func(s *sql.Selector) { 344 s.Where(sql.In(s.C(FieldEntID), v...)) 345 }) 346 } 347 348 // EntIDNotIn applies the NotIn predicate on the "ent_id" field. 349 func EntIDNotIn(vs ...uuid.UUID) predicate.CoinUsedFor { 350 v := make([]interface{}, len(vs)) 351 for i := range v { 352 v[i] = vs[i] 353 } 354 return predicate.CoinUsedFor(func(s *sql.Selector) { 355 s.Where(sql.NotIn(s.C(FieldEntID), v...)) 356 }) 357 } 358 359 // EntIDGT applies the GT predicate on the "ent_id" field. 360 func EntIDGT(v uuid.UUID) predicate.CoinUsedFor { 361 return predicate.CoinUsedFor(func(s *sql.Selector) { 362 s.Where(sql.GT(s.C(FieldEntID), v)) 363 }) 364 } 365 366 // EntIDGTE applies the GTE predicate on the "ent_id" field. 367 func EntIDGTE(v uuid.UUID) predicate.CoinUsedFor { 368 return predicate.CoinUsedFor(func(s *sql.Selector) { 369 s.Where(sql.GTE(s.C(FieldEntID), v)) 370 }) 371 } 372 373 // EntIDLT applies the LT predicate on the "ent_id" field. 374 func EntIDLT(v uuid.UUID) predicate.CoinUsedFor { 375 return predicate.CoinUsedFor(func(s *sql.Selector) { 376 s.Where(sql.LT(s.C(FieldEntID), v)) 377 }) 378 } 379 380 // EntIDLTE applies the LTE predicate on the "ent_id" field. 381 func EntIDLTE(v uuid.UUID) predicate.CoinUsedFor { 382 return predicate.CoinUsedFor(func(s *sql.Selector) { 383 s.Where(sql.LTE(s.C(FieldEntID), v)) 384 }) 385 } 386 387 // CoinTypeIDEQ applies the EQ predicate on the "coin_type_id" field. 388 func CoinTypeIDEQ(v uuid.UUID) predicate.CoinUsedFor { 389 return predicate.CoinUsedFor(func(s *sql.Selector) { 390 s.Where(sql.EQ(s.C(FieldCoinTypeID), v)) 391 }) 392 } 393 394 // CoinTypeIDNEQ applies the NEQ predicate on the "coin_type_id" field. 395 func CoinTypeIDNEQ(v uuid.UUID) predicate.CoinUsedFor { 396 return predicate.CoinUsedFor(func(s *sql.Selector) { 397 s.Where(sql.NEQ(s.C(FieldCoinTypeID), v)) 398 }) 399 } 400 401 // CoinTypeIDIn applies the In predicate on the "coin_type_id" field. 402 func CoinTypeIDIn(vs ...uuid.UUID) predicate.CoinUsedFor { 403 v := make([]interface{}, len(vs)) 404 for i := range v { 405 v[i] = vs[i] 406 } 407 return predicate.CoinUsedFor(func(s *sql.Selector) { 408 s.Where(sql.In(s.C(FieldCoinTypeID), v...)) 409 }) 410 } 411 412 // CoinTypeIDNotIn applies the NotIn predicate on the "coin_type_id" field. 413 func CoinTypeIDNotIn(vs ...uuid.UUID) predicate.CoinUsedFor { 414 v := make([]interface{}, len(vs)) 415 for i := range v { 416 v[i] = vs[i] 417 } 418 return predicate.CoinUsedFor(func(s *sql.Selector) { 419 s.Where(sql.NotIn(s.C(FieldCoinTypeID), v...)) 420 }) 421 } 422 423 // CoinTypeIDGT applies the GT predicate on the "coin_type_id" field. 424 func CoinTypeIDGT(v uuid.UUID) predicate.CoinUsedFor { 425 return predicate.CoinUsedFor(func(s *sql.Selector) { 426 s.Where(sql.GT(s.C(FieldCoinTypeID), v)) 427 }) 428 } 429 430 // CoinTypeIDGTE applies the GTE predicate on the "coin_type_id" field. 431 func CoinTypeIDGTE(v uuid.UUID) predicate.CoinUsedFor { 432 return predicate.CoinUsedFor(func(s *sql.Selector) { 433 s.Where(sql.GTE(s.C(FieldCoinTypeID), v)) 434 }) 435 } 436 437 // CoinTypeIDLT applies the LT predicate on the "coin_type_id" field. 438 func CoinTypeIDLT(v uuid.UUID) predicate.CoinUsedFor { 439 return predicate.CoinUsedFor(func(s *sql.Selector) { 440 s.Where(sql.LT(s.C(FieldCoinTypeID), v)) 441 }) 442 } 443 444 // CoinTypeIDLTE applies the LTE predicate on the "coin_type_id" field. 445 func CoinTypeIDLTE(v uuid.UUID) predicate.CoinUsedFor { 446 return predicate.CoinUsedFor(func(s *sql.Selector) { 447 s.Where(sql.LTE(s.C(FieldCoinTypeID), v)) 448 }) 449 } 450 451 // CoinTypeIDIsNil applies the IsNil predicate on the "coin_type_id" field. 452 func CoinTypeIDIsNil() predicate.CoinUsedFor { 453 return predicate.CoinUsedFor(func(s *sql.Selector) { 454 s.Where(sql.IsNull(s.C(FieldCoinTypeID))) 455 }) 456 } 457 458 // CoinTypeIDNotNil applies the NotNil predicate on the "coin_type_id" field. 459 func CoinTypeIDNotNil() predicate.CoinUsedFor { 460 return predicate.CoinUsedFor(func(s *sql.Selector) { 461 s.Where(sql.NotNull(s.C(FieldCoinTypeID))) 462 }) 463 } 464 465 // UsedForEQ applies the EQ predicate on the "used_for" field. 466 func UsedForEQ(v string) predicate.CoinUsedFor { 467 return predicate.CoinUsedFor(func(s *sql.Selector) { 468 s.Where(sql.EQ(s.C(FieldUsedFor), v)) 469 }) 470 } 471 472 // UsedForNEQ applies the NEQ predicate on the "used_for" field. 473 func UsedForNEQ(v string) predicate.CoinUsedFor { 474 return predicate.CoinUsedFor(func(s *sql.Selector) { 475 s.Where(sql.NEQ(s.C(FieldUsedFor), v)) 476 }) 477 } 478 479 // UsedForIn applies the In predicate on the "used_for" field. 480 func UsedForIn(vs ...string) predicate.CoinUsedFor { 481 v := make([]interface{}, len(vs)) 482 for i := range v { 483 v[i] = vs[i] 484 } 485 return predicate.CoinUsedFor(func(s *sql.Selector) { 486 s.Where(sql.In(s.C(FieldUsedFor), v...)) 487 }) 488 } 489 490 // UsedForNotIn applies the NotIn predicate on the "used_for" field. 491 func UsedForNotIn(vs ...string) predicate.CoinUsedFor { 492 v := make([]interface{}, len(vs)) 493 for i := range v { 494 v[i] = vs[i] 495 } 496 return predicate.CoinUsedFor(func(s *sql.Selector) { 497 s.Where(sql.NotIn(s.C(FieldUsedFor), v...)) 498 }) 499 } 500 501 // UsedForGT applies the GT predicate on the "used_for" field. 502 func UsedForGT(v string) predicate.CoinUsedFor { 503 return predicate.CoinUsedFor(func(s *sql.Selector) { 504 s.Where(sql.GT(s.C(FieldUsedFor), v)) 505 }) 506 } 507 508 // UsedForGTE applies the GTE predicate on the "used_for" field. 509 func UsedForGTE(v string) predicate.CoinUsedFor { 510 return predicate.CoinUsedFor(func(s *sql.Selector) { 511 s.Where(sql.GTE(s.C(FieldUsedFor), v)) 512 }) 513 } 514 515 // UsedForLT applies the LT predicate on the "used_for" field. 516 func UsedForLT(v string) predicate.CoinUsedFor { 517 return predicate.CoinUsedFor(func(s *sql.Selector) { 518 s.Where(sql.LT(s.C(FieldUsedFor), v)) 519 }) 520 } 521 522 // UsedForLTE applies the LTE predicate on the "used_for" field. 523 func UsedForLTE(v string) predicate.CoinUsedFor { 524 return predicate.CoinUsedFor(func(s *sql.Selector) { 525 s.Where(sql.LTE(s.C(FieldUsedFor), v)) 526 }) 527 } 528 529 // UsedForContains applies the Contains predicate on the "used_for" field. 530 func UsedForContains(v string) predicate.CoinUsedFor { 531 return predicate.CoinUsedFor(func(s *sql.Selector) { 532 s.Where(sql.Contains(s.C(FieldUsedFor), v)) 533 }) 534 } 535 536 // UsedForHasPrefix applies the HasPrefix predicate on the "used_for" field. 537 func UsedForHasPrefix(v string) predicate.CoinUsedFor { 538 return predicate.CoinUsedFor(func(s *sql.Selector) { 539 s.Where(sql.HasPrefix(s.C(FieldUsedFor), v)) 540 }) 541 } 542 543 // UsedForHasSuffix applies the HasSuffix predicate on the "used_for" field. 544 func UsedForHasSuffix(v string) predicate.CoinUsedFor { 545 return predicate.CoinUsedFor(func(s *sql.Selector) { 546 s.Where(sql.HasSuffix(s.C(FieldUsedFor), v)) 547 }) 548 } 549 550 // UsedForIsNil applies the IsNil predicate on the "used_for" field. 551 func UsedForIsNil() predicate.CoinUsedFor { 552 return predicate.CoinUsedFor(func(s *sql.Selector) { 553 s.Where(sql.IsNull(s.C(FieldUsedFor))) 554 }) 555 } 556 557 // UsedForNotNil applies the NotNil predicate on the "used_for" field. 558 func UsedForNotNil() predicate.CoinUsedFor { 559 return predicate.CoinUsedFor(func(s *sql.Selector) { 560 s.Where(sql.NotNull(s.C(FieldUsedFor))) 561 }) 562 } 563 564 // UsedForEqualFold applies the EqualFold predicate on the "used_for" field. 565 func UsedForEqualFold(v string) predicate.CoinUsedFor { 566 return predicate.CoinUsedFor(func(s *sql.Selector) { 567 s.Where(sql.EqualFold(s.C(FieldUsedFor), v)) 568 }) 569 } 570 571 // UsedForContainsFold applies the ContainsFold predicate on the "used_for" field. 572 func UsedForContainsFold(v string) predicate.CoinUsedFor { 573 return predicate.CoinUsedFor(func(s *sql.Selector) { 574 s.Where(sql.ContainsFold(s.C(FieldUsedFor), v)) 575 }) 576 } 577 578 // PriorityEQ applies the EQ predicate on the "priority" field. 579 func PriorityEQ(v uint32) predicate.CoinUsedFor { 580 return predicate.CoinUsedFor(func(s *sql.Selector) { 581 s.Where(sql.EQ(s.C(FieldPriority), v)) 582 }) 583 } 584 585 // PriorityNEQ applies the NEQ predicate on the "priority" field. 586 func PriorityNEQ(v uint32) predicate.CoinUsedFor { 587 return predicate.CoinUsedFor(func(s *sql.Selector) { 588 s.Where(sql.NEQ(s.C(FieldPriority), v)) 589 }) 590 } 591 592 // PriorityIn applies the In predicate on the "priority" field. 593 func PriorityIn(vs ...uint32) predicate.CoinUsedFor { 594 v := make([]interface{}, len(vs)) 595 for i := range v { 596 v[i] = vs[i] 597 } 598 return predicate.CoinUsedFor(func(s *sql.Selector) { 599 s.Where(sql.In(s.C(FieldPriority), v...)) 600 }) 601 } 602 603 // PriorityNotIn applies the NotIn predicate on the "priority" field. 604 func PriorityNotIn(vs ...uint32) predicate.CoinUsedFor { 605 v := make([]interface{}, len(vs)) 606 for i := range v { 607 v[i] = vs[i] 608 } 609 return predicate.CoinUsedFor(func(s *sql.Selector) { 610 s.Where(sql.NotIn(s.C(FieldPriority), v...)) 611 }) 612 } 613 614 // PriorityGT applies the GT predicate on the "priority" field. 615 func PriorityGT(v uint32) predicate.CoinUsedFor { 616 return predicate.CoinUsedFor(func(s *sql.Selector) { 617 s.Where(sql.GT(s.C(FieldPriority), v)) 618 }) 619 } 620 621 // PriorityGTE applies the GTE predicate on the "priority" field. 622 func PriorityGTE(v uint32) predicate.CoinUsedFor { 623 return predicate.CoinUsedFor(func(s *sql.Selector) { 624 s.Where(sql.GTE(s.C(FieldPriority), v)) 625 }) 626 } 627 628 // PriorityLT applies the LT predicate on the "priority" field. 629 func PriorityLT(v uint32) predicate.CoinUsedFor { 630 return predicate.CoinUsedFor(func(s *sql.Selector) { 631 s.Where(sql.LT(s.C(FieldPriority), v)) 632 }) 633 } 634 635 // PriorityLTE applies the LTE predicate on the "priority" field. 636 func PriorityLTE(v uint32) predicate.CoinUsedFor { 637 return predicate.CoinUsedFor(func(s *sql.Selector) { 638 s.Where(sql.LTE(s.C(FieldPriority), v)) 639 }) 640 } 641 642 // PriorityIsNil applies the IsNil predicate on the "priority" field. 643 func PriorityIsNil() predicate.CoinUsedFor { 644 return predicate.CoinUsedFor(func(s *sql.Selector) { 645 s.Where(sql.IsNull(s.C(FieldPriority))) 646 }) 647 } 648 649 // PriorityNotNil applies the NotNil predicate on the "priority" field. 650 func PriorityNotNil() predicate.CoinUsedFor { 651 return predicate.CoinUsedFor(func(s *sql.Selector) { 652 s.Where(sql.NotNull(s.C(FieldPriority))) 653 }) 654 } 655 656 // And groups predicates with the AND operator between them. 657 func And(predicates ...predicate.CoinUsedFor) predicate.CoinUsedFor { 658 return predicate.CoinUsedFor(func(s *sql.Selector) { 659 s1 := s.Clone().SetP(nil) 660 for _, p := range predicates { 661 p(s1) 662 } 663 s.Where(s1.P()) 664 }) 665 } 666 667 // Or groups predicates with the OR operator between them. 668 func Or(predicates ...predicate.CoinUsedFor) predicate.CoinUsedFor { 669 return predicate.CoinUsedFor(func(s *sql.Selector) { 670 s1 := s.Clone().SetP(nil) 671 for i, p := range predicates { 672 if i > 0 { 673 s1.Or() 674 } 675 p(s1) 676 } 677 s.Where(s1.P()) 678 }) 679 } 680 681 // Not applies the not operator on the given predicate. 682 func Not(p predicate.CoinUsedFor) predicate.CoinUsedFor { 683 return predicate.CoinUsedFor(func(s *sql.Selector) { 684 p(s.Not()) 685 }) 686 }