github.com/NpoolPlatform/chain-middleware@v0.0.0-20240228100535-eb1bcf896eb9/pkg/db/ent/fiat/where.go (about) 1 // Code generated by ent, DO NOT EDIT. 2 3 package fiat 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.Fiat { 13 return predicate.Fiat(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.Fiat { 20 return predicate.Fiat(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.Fiat { 27 return predicate.Fiat(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.Fiat { 34 return predicate.Fiat(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.Fiat { 45 return predicate.Fiat(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.Fiat { 56 return predicate.Fiat(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.Fiat { 63 return predicate.Fiat(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.Fiat { 70 return predicate.Fiat(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.Fiat { 77 return predicate.Fiat(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.Fiat { 84 return predicate.Fiat(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.Fiat { 91 return predicate.Fiat(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.Fiat { 98 return predicate.Fiat(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.Fiat { 105 return predicate.Fiat(func(s *sql.Selector) { 106 s.Where(sql.EQ(s.C(FieldEntID), v)) 107 }) 108 } 109 110 // Name applies equality check predicate on the "name" field. It's identical to NameEQ. 111 func Name(v string) predicate.Fiat { 112 return predicate.Fiat(func(s *sql.Selector) { 113 s.Where(sql.EQ(s.C(FieldName), v)) 114 }) 115 } 116 117 // Logo applies equality check predicate on the "logo" field. It's identical to LogoEQ. 118 func Logo(v string) predicate.Fiat { 119 return predicate.Fiat(func(s *sql.Selector) { 120 s.Where(sql.EQ(s.C(FieldLogo), v)) 121 }) 122 } 123 124 // Unit applies equality check predicate on the "unit" field. It's identical to UnitEQ. 125 func Unit(v string) predicate.Fiat { 126 return predicate.Fiat(func(s *sql.Selector) { 127 s.Where(sql.EQ(s.C(FieldUnit), v)) 128 }) 129 } 130 131 // CreatedAtEQ applies the EQ predicate on the "created_at" field. 132 func CreatedAtEQ(v uint32) predicate.Fiat { 133 return predicate.Fiat(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.Fiat { 140 return predicate.Fiat(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.Fiat { 147 v := make([]interface{}, len(vs)) 148 for i := range v { 149 v[i] = vs[i] 150 } 151 return predicate.Fiat(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.Fiat { 158 v := make([]interface{}, len(vs)) 159 for i := range v { 160 v[i] = vs[i] 161 } 162 return predicate.Fiat(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.Fiat { 169 return predicate.Fiat(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.Fiat { 176 return predicate.Fiat(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.Fiat { 183 return predicate.Fiat(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.Fiat { 190 return predicate.Fiat(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.Fiat { 197 return predicate.Fiat(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.Fiat { 204 return predicate.Fiat(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.Fiat { 211 v := make([]interface{}, len(vs)) 212 for i := range v { 213 v[i] = vs[i] 214 } 215 return predicate.Fiat(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.Fiat { 222 v := make([]interface{}, len(vs)) 223 for i := range v { 224 v[i] = vs[i] 225 } 226 return predicate.Fiat(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.Fiat { 233 return predicate.Fiat(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.Fiat { 240 return predicate.Fiat(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.Fiat { 247 return predicate.Fiat(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.Fiat { 254 return predicate.Fiat(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.Fiat { 261 return predicate.Fiat(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.Fiat { 268 return predicate.Fiat(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.Fiat { 275 v := make([]interface{}, len(vs)) 276 for i := range v { 277 v[i] = vs[i] 278 } 279 return predicate.Fiat(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.Fiat { 286 v := make([]interface{}, len(vs)) 287 for i := range v { 288 v[i] = vs[i] 289 } 290 return predicate.Fiat(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.Fiat { 297 return predicate.Fiat(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.Fiat { 304 return predicate.Fiat(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.Fiat { 311 return predicate.Fiat(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.Fiat { 318 return predicate.Fiat(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.Fiat { 325 return predicate.Fiat(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.Fiat { 332 return predicate.Fiat(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.Fiat { 339 v := make([]interface{}, len(vs)) 340 for i := range v { 341 v[i] = vs[i] 342 } 343 return predicate.Fiat(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.Fiat { 350 v := make([]interface{}, len(vs)) 351 for i := range v { 352 v[i] = vs[i] 353 } 354 return predicate.Fiat(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.Fiat { 361 return predicate.Fiat(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.Fiat { 368 return predicate.Fiat(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.Fiat { 375 return predicate.Fiat(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.Fiat { 382 return predicate.Fiat(func(s *sql.Selector) { 383 s.Where(sql.LTE(s.C(FieldEntID), v)) 384 }) 385 } 386 387 // NameEQ applies the EQ predicate on the "name" field. 388 func NameEQ(v string) predicate.Fiat { 389 return predicate.Fiat(func(s *sql.Selector) { 390 s.Where(sql.EQ(s.C(FieldName), v)) 391 }) 392 } 393 394 // NameNEQ applies the NEQ predicate on the "name" field. 395 func NameNEQ(v string) predicate.Fiat { 396 return predicate.Fiat(func(s *sql.Selector) { 397 s.Where(sql.NEQ(s.C(FieldName), v)) 398 }) 399 } 400 401 // NameIn applies the In predicate on the "name" field. 402 func NameIn(vs ...string) predicate.Fiat { 403 v := make([]interface{}, len(vs)) 404 for i := range v { 405 v[i] = vs[i] 406 } 407 return predicate.Fiat(func(s *sql.Selector) { 408 s.Where(sql.In(s.C(FieldName), v...)) 409 }) 410 } 411 412 // NameNotIn applies the NotIn predicate on the "name" field. 413 func NameNotIn(vs ...string) predicate.Fiat { 414 v := make([]interface{}, len(vs)) 415 for i := range v { 416 v[i] = vs[i] 417 } 418 return predicate.Fiat(func(s *sql.Selector) { 419 s.Where(sql.NotIn(s.C(FieldName), v...)) 420 }) 421 } 422 423 // NameGT applies the GT predicate on the "name" field. 424 func NameGT(v string) predicate.Fiat { 425 return predicate.Fiat(func(s *sql.Selector) { 426 s.Where(sql.GT(s.C(FieldName), v)) 427 }) 428 } 429 430 // NameGTE applies the GTE predicate on the "name" field. 431 func NameGTE(v string) predicate.Fiat { 432 return predicate.Fiat(func(s *sql.Selector) { 433 s.Where(sql.GTE(s.C(FieldName), v)) 434 }) 435 } 436 437 // NameLT applies the LT predicate on the "name" field. 438 func NameLT(v string) predicate.Fiat { 439 return predicate.Fiat(func(s *sql.Selector) { 440 s.Where(sql.LT(s.C(FieldName), v)) 441 }) 442 } 443 444 // NameLTE applies the LTE predicate on the "name" field. 445 func NameLTE(v string) predicate.Fiat { 446 return predicate.Fiat(func(s *sql.Selector) { 447 s.Where(sql.LTE(s.C(FieldName), v)) 448 }) 449 } 450 451 // NameContains applies the Contains predicate on the "name" field. 452 func NameContains(v string) predicate.Fiat { 453 return predicate.Fiat(func(s *sql.Selector) { 454 s.Where(sql.Contains(s.C(FieldName), v)) 455 }) 456 } 457 458 // NameHasPrefix applies the HasPrefix predicate on the "name" field. 459 func NameHasPrefix(v string) predicate.Fiat { 460 return predicate.Fiat(func(s *sql.Selector) { 461 s.Where(sql.HasPrefix(s.C(FieldName), v)) 462 }) 463 } 464 465 // NameHasSuffix applies the HasSuffix predicate on the "name" field. 466 func NameHasSuffix(v string) predicate.Fiat { 467 return predicate.Fiat(func(s *sql.Selector) { 468 s.Where(sql.HasSuffix(s.C(FieldName), v)) 469 }) 470 } 471 472 // NameIsNil applies the IsNil predicate on the "name" field. 473 func NameIsNil() predicate.Fiat { 474 return predicate.Fiat(func(s *sql.Selector) { 475 s.Where(sql.IsNull(s.C(FieldName))) 476 }) 477 } 478 479 // NameNotNil applies the NotNil predicate on the "name" field. 480 func NameNotNil() predicate.Fiat { 481 return predicate.Fiat(func(s *sql.Selector) { 482 s.Where(sql.NotNull(s.C(FieldName))) 483 }) 484 } 485 486 // NameEqualFold applies the EqualFold predicate on the "name" field. 487 func NameEqualFold(v string) predicate.Fiat { 488 return predicate.Fiat(func(s *sql.Selector) { 489 s.Where(sql.EqualFold(s.C(FieldName), v)) 490 }) 491 } 492 493 // NameContainsFold applies the ContainsFold predicate on the "name" field. 494 func NameContainsFold(v string) predicate.Fiat { 495 return predicate.Fiat(func(s *sql.Selector) { 496 s.Where(sql.ContainsFold(s.C(FieldName), v)) 497 }) 498 } 499 500 // LogoEQ applies the EQ predicate on the "logo" field. 501 func LogoEQ(v string) predicate.Fiat { 502 return predicate.Fiat(func(s *sql.Selector) { 503 s.Where(sql.EQ(s.C(FieldLogo), v)) 504 }) 505 } 506 507 // LogoNEQ applies the NEQ predicate on the "logo" field. 508 func LogoNEQ(v string) predicate.Fiat { 509 return predicate.Fiat(func(s *sql.Selector) { 510 s.Where(sql.NEQ(s.C(FieldLogo), v)) 511 }) 512 } 513 514 // LogoIn applies the In predicate on the "logo" field. 515 func LogoIn(vs ...string) predicate.Fiat { 516 v := make([]interface{}, len(vs)) 517 for i := range v { 518 v[i] = vs[i] 519 } 520 return predicate.Fiat(func(s *sql.Selector) { 521 s.Where(sql.In(s.C(FieldLogo), v...)) 522 }) 523 } 524 525 // LogoNotIn applies the NotIn predicate on the "logo" field. 526 func LogoNotIn(vs ...string) predicate.Fiat { 527 v := make([]interface{}, len(vs)) 528 for i := range v { 529 v[i] = vs[i] 530 } 531 return predicate.Fiat(func(s *sql.Selector) { 532 s.Where(sql.NotIn(s.C(FieldLogo), v...)) 533 }) 534 } 535 536 // LogoGT applies the GT predicate on the "logo" field. 537 func LogoGT(v string) predicate.Fiat { 538 return predicate.Fiat(func(s *sql.Selector) { 539 s.Where(sql.GT(s.C(FieldLogo), v)) 540 }) 541 } 542 543 // LogoGTE applies the GTE predicate on the "logo" field. 544 func LogoGTE(v string) predicate.Fiat { 545 return predicate.Fiat(func(s *sql.Selector) { 546 s.Where(sql.GTE(s.C(FieldLogo), v)) 547 }) 548 } 549 550 // LogoLT applies the LT predicate on the "logo" field. 551 func LogoLT(v string) predicate.Fiat { 552 return predicate.Fiat(func(s *sql.Selector) { 553 s.Where(sql.LT(s.C(FieldLogo), v)) 554 }) 555 } 556 557 // LogoLTE applies the LTE predicate on the "logo" field. 558 func LogoLTE(v string) predicate.Fiat { 559 return predicate.Fiat(func(s *sql.Selector) { 560 s.Where(sql.LTE(s.C(FieldLogo), v)) 561 }) 562 } 563 564 // LogoContains applies the Contains predicate on the "logo" field. 565 func LogoContains(v string) predicate.Fiat { 566 return predicate.Fiat(func(s *sql.Selector) { 567 s.Where(sql.Contains(s.C(FieldLogo), v)) 568 }) 569 } 570 571 // LogoHasPrefix applies the HasPrefix predicate on the "logo" field. 572 func LogoHasPrefix(v string) predicate.Fiat { 573 return predicate.Fiat(func(s *sql.Selector) { 574 s.Where(sql.HasPrefix(s.C(FieldLogo), v)) 575 }) 576 } 577 578 // LogoHasSuffix applies the HasSuffix predicate on the "logo" field. 579 func LogoHasSuffix(v string) predicate.Fiat { 580 return predicate.Fiat(func(s *sql.Selector) { 581 s.Where(sql.HasSuffix(s.C(FieldLogo), v)) 582 }) 583 } 584 585 // LogoIsNil applies the IsNil predicate on the "logo" field. 586 func LogoIsNil() predicate.Fiat { 587 return predicate.Fiat(func(s *sql.Selector) { 588 s.Where(sql.IsNull(s.C(FieldLogo))) 589 }) 590 } 591 592 // LogoNotNil applies the NotNil predicate on the "logo" field. 593 func LogoNotNil() predicate.Fiat { 594 return predicate.Fiat(func(s *sql.Selector) { 595 s.Where(sql.NotNull(s.C(FieldLogo))) 596 }) 597 } 598 599 // LogoEqualFold applies the EqualFold predicate on the "logo" field. 600 func LogoEqualFold(v string) predicate.Fiat { 601 return predicate.Fiat(func(s *sql.Selector) { 602 s.Where(sql.EqualFold(s.C(FieldLogo), v)) 603 }) 604 } 605 606 // LogoContainsFold applies the ContainsFold predicate on the "logo" field. 607 func LogoContainsFold(v string) predicate.Fiat { 608 return predicate.Fiat(func(s *sql.Selector) { 609 s.Where(sql.ContainsFold(s.C(FieldLogo), v)) 610 }) 611 } 612 613 // UnitEQ applies the EQ predicate on the "unit" field. 614 func UnitEQ(v string) predicate.Fiat { 615 return predicate.Fiat(func(s *sql.Selector) { 616 s.Where(sql.EQ(s.C(FieldUnit), v)) 617 }) 618 } 619 620 // UnitNEQ applies the NEQ predicate on the "unit" field. 621 func UnitNEQ(v string) predicate.Fiat { 622 return predicate.Fiat(func(s *sql.Selector) { 623 s.Where(sql.NEQ(s.C(FieldUnit), v)) 624 }) 625 } 626 627 // UnitIn applies the In predicate on the "unit" field. 628 func UnitIn(vs ...string) predicate.Fiat { 629 v := make([]interface{}, len(vs)) 630 for i := range v { 631 v[i] = vs[i] 632 } 633 return predicate.Fiat(func(s *sql.Selector) { 634 s.Where(sql.In(s.C(FieldUnit), v...)) 635 }) 636 } 637 638 // UnitNotIn applies the NotIn predicate on the "unit" field. 639 func UnitNotIn(vs ...string) predicate.Fiat { 640 v := make([]interface{}, len(vs)) 641 for i := range v { 642 v[i] = vs[i] 643 } 644 return predicate.Fiat(func(s *sql.Selector) { 645 s.Where(sql.NotIn(s.C(FieldUnit), v...)) 646 }) 647 } 648 649 // UnitGT applies the GT predicate on the "unit" field. 650 func UnitGT(v string) predicate.Fiat { 651 return predicate.Fiat(func(s *sql.Selector) { 652 s.Where(sql.GT(s.C(FieldUnit), v)) 653 }) 654 } 655 656 // UnitGTE applies the GTE predicate on the "unit" field. 657 func UnitGTE(v string) predicate.Fiat { 658 return predicate.Fiat(func(s *sql.Selector) { 659 s.Where(sql.GTE(s.C(FieldUnit), v)) 660 }) 661 } 662 663 // UnitLT applies the LT predicate on the "unit" field. 664 func UnitLT(v string) predicate.Fiat { 665 return predicate.Fiat(func(s *sql.Selector) { 666 s.Where(sql.LT(s.C(FieldUnit), v)) 667 }) 668 } 669 670 // UnitLTE applies the LTE predicate on the "unit" field. 671 func UnitLTE(v string) predicate.Fiat { 672 return predicate.Fiat(func(s *sql.Selector) { 673 s.Where(sql.LTE(s.C(FieldUnit), v)) 674 }) 675 } 676 677 // UnitContains applies the Contains predicate on the "unit" field. 678 func UnitContains(v string) predicate.Fiat { 679 return predicate.Fiat(func(s *sql.Selector) { 680 s.Where(sql.Contains(s.C(FieldUnit), v)) 681 }) 682 } 683 684 // UnitHasPrefix applies the HasPrefix predicate on the "unit" field. 685 func UnitHasPrefix(v string) predicate.Fiat { 686 return predicate.Fiat(func(s *sql.Selector) { 687 s.Where(sql.HasPrefix(s.C(FieldUnit), v)) 688 }) 689 } 690 691 // UnitHasSuffix applies the HasSuffix predicate on the "unit" field. 692 func UnitHasSuffix(v string) predicate.Fiat { 693 return predicate.Fiat(func(s *sql.Selector) { 694 s.Where(sql.HasSuffix(s.C(FieldUnit), v)) 695 }) 696 } 697 698 // UnitIsNil applies the IsNil predicate on the "unit" field. 699 func UnitIsNil() predicate.Fiat { 700 return predicate.Fiat(func(s *sql.Selector) { 701 s.Where(sql.IsNull(s.C(FieldUnit))) 702 }) 703 } 704 705 // UnitNotNil applies the NotNil predicate on the "unit" field. 706 func UnitNotNil() predicate.Fiat { 707 return predicate.Fiat(func(s *sql.Selector) { 708 s.Where(sql.NotNull(s.C(FieldUnit))) 709 }) 710 } 711 712 // UnitEqualFold applies the EqualFold predicate on the "unit" field. 713 func UnitEqualFold(v string) predicate.Fiat { 714 return predicate.Fiat(func(s *sql.Selector) { 715 s.Where(sql.EqualFold(s.C(FieldUnit), v)) 716 }) 717 } 718 719 // UnitContainsFold applies the ContainsFold predicate on the "unit" field. 720 func UnitContainsFold(v string) predicate.Fiat { 721 return predicate.Fiat(func(s *sql.Selector) { 722 s.Where(sql.ContainsFold(s.C(FieldUnit), v)) 723 }) 724 } 725 726 // And groups predicates with the AND operator between them. 727 func And(predicates ...predicate.Fiat) predicate.Fiat { 728 return predicate.Fiat(func(s *sql.Selector) { 729 s1 := s.Clone().SetP(nil) 730 for _, p := range predicates { 731 p(s1) 732 } 733 s.Where(s1.P()) 734 }) 735 } 736 737 // Or groups predicates with the OR operator between them. 738 func Or(predicates ...predicate.Fiat) predicate.Fiat { 739 return predicate.Fiat(func(s *sql.Selector) { 740 s1 := s.Clone().SetP(nil) 741 for i, p := range predicates { 742 if i > 0 { 743 s1.Or() 744 } 745 p(s1) 746 } 747 s.Where(s1.P()) 748 }) 749 } 750 751 // Not applies the not operator on the given predicate. 752 func Not(p predicate.Fiat) predicate.Fiat { 753 return predicate.Fiat(func(s *sql.Selector) { 754 p(s.Not()) 755 }) 756 }