1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216 |
- // Code generated by entc, DO NOT EDIT.
- package machine
- import (
- "time"
- "entgo.io/ent/dialect/sql"
- "entgo.io/ent/dialect/sql/sqlgraph"
- "github.com/crowdsecurity/crowdsec/pkg/database/ent/predicate"
- )
- // ID filters vertices based on their ID field.
- func ID(id int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldID), id))
- })
- }
- // IDEQ applies the EQ predicate on the ID field.
- func IDEQ(id int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldID), id))
- })
- }
- // IDNEQ applies the NEQ predicate on the ID field.
- func IDNEQ(id int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldID), id))
- })
- }
- // IDIn applies the In predicate on the ID field.
- func IDIn(ids ...int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(ids) == 0 {
- s.Where(sql.False())
- return
- }
- v := make([]interface{}, len(ids))
- for i := range v {
- v[i] = ids[i]
- }
- s.Where(sql.In(s.C(FieldID), v...))
- })
- }
- // IDNotIn applies the NotIn predicate on the ID field.
- func IDNotIn(ids ...int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(ids) == 0 {
- s.Where(sql.False())
- return
- }
- v := make([]interface{}, len(ids))
- for i := range v {
- v[i] = ids[i]
- }
- s.Where(sql.NotIn(s.C(FieldID), v...))
- })
- }
- // IDGT applies the GT predicate on the ID field.
- func IDGT(id int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldID), id))
- })
- }
- // IDGTE applies the GTE predicate on the ID field.
- func IDGTE(id int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldID), id))
- })
- }
- // IDLT applies the LT predicate on the ID field.
- func IDLT(id int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldID), id))
- })
- }
- // IDLTE applies the LTE predicate on the ID field.
- func IDLTE(id int) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldID), id))
- })
- }
- // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
- func CreatedAt(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldCreatedAt), v))
- })
- }
- // UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
- func UpdatedAt(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldUpdatedAt), v))
- })
- }
- // LastPush applies equality check predicate on the "last_push" field. It's identical to LastPushEQ.
- func LastPush(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldLastPush), v))
- })
- }
- // MachineId applies equality check predicate on the "machineId" field. It's identical to MachineIdEQ.
- func MachineId(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldMachineId), v))
- })
- }
- // Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
- func Password(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldPassword), v))
- })
- }
- // IpAddress applies equality check predicate on the "ipAddress" field. It's identical to IpAddressEQ.
- func IpAddress(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldIpAddress), v))
- })
- }
- // Scenarios applies equality check predicate on the "scenarios" field. It's identical to ScenariosEQ.
- func Scenarios(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldScenarios), v))
- })
- }
- // Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
- func Version(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldVersion), v))
- })
- }
- // IsValidated applies equality check predicate on the "isValidated" field. It's identical to IsValidatedEQ.
- func IsValidated(v bool) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldIsValidated), v))
- })
- }
- // Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
- func Status(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldStatus), v))
- })
- }
- // CreatedAtEQ applies the EQ predicate on the "created_at" field.
- func CreatedAtEQ(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldCreatedAt), v))
- })
- }
- // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
- func CreatedAtNEQ(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldCreatedAt), v))
- })
- }
- // CreatedAtIn applies the In predicate on the "created_at" field.
- func CreatedAtIn(vs ...time.Time) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldCreatedAt), v...))
- })
- }
- // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
- func CreatedAtNotIn(vs ...time.Time) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldCreatedAt), v...))
- })
- }
- // CreatedAtGT applies the GT predicate on the "created_at" field.
- func CreatedAtGT(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldCreatedAt), v))
- })
- }
- // CreatedAtGTE applies the GTE predicate on the "created_at" field.
- func CreatedAtGTE(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldCreatedAt), v))
- })
- }
- // CreatedAtLT applies the LT predicate on the "created_at" field.
- func CreatedAtLT(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldCreatedAt), v))
- })
- }
- // CreatedAtLTE applies the LTE predicate on the "created_at" field.
- func CreatedAtLTE(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldCreatedAt), v))
- })
- }
- // CreatedAtIsNil applies the IsNil predicate on the "created_at" field.
- func CreatedAtIsNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.IsNull(s.C(FieldCreatedAt)))
- })
- }
- // CreatedAtNotNil applies the NotNil predicate on the "created_at" field.
- func CreatedAtNotNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NotNull(s.C(FieldCreatedAt)))
- })
- }
- // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
- func UpdatedAtEQ(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldUpdatedAt), v))
- })
- }
- // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
- func UpdatedAtNEQ(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldUpdatedAt), v))
- })
- }
- // UpdatedAtIn applies the In predicate on the "updated_at" field.
- func UpdatedAtIn(vs ...time.Time) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldUpdatedAt), v...))
- })
- }
- // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
- func UpdatedAtNotIn(vs ...time.Time) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldUpdatedAt), v...))
- })
- }
- // UpdatedAtGT applies the GT predicate on the "updated_at" field.
- func UpdatedAtGT(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldUpdatedAt), v))
- })
- }
- // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
- func UpdatedAtGTE(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldUpdatedAt), v))
- })
- }
- // UpdatedAtLT applies the LT predicate on the "updated_at" field.
- func UpdatedAtLT(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldUpdatedAt), v))
- })
- }
- // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
- func UpdatedAtLTE(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldUpdatedAt), v))
- })
- }
- // UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
- func UpdatedAtIsNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.IsNull(s.C(FieldUpdatedAt)))
- })
- }
- // UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.
- func UpdatedAtNotNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NotNull(s.C(FieldUpdatedAt)))
- })
- }
- // LastPushEQ applies the EQ predicate on the "last_push" field.
- func LastPushEQ(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldLastPush), v))
- })
- }
- // LastPushNEQ applies the NEQ predicate on the "last_push" field.
- func LastPushNEQ(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldLastPush), v))
- })
- }
- // LastPushIn applies the In predicate on the "last_push" field.
- func LastPushIn(vs ...time.Time) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldLastPush), v...))
- })
- }
- // LastPushNotIn applies the NotIn predicate on the "last_push" field.
- func LastPushNotIn(vs ...time.Time) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldLastPush), v...))
- })
- }
- // LastPushGT applies the GT predicate on the "last_push" field.
- func LastPushGT(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldLastPush), v))
- })
- }
- // LastPushGTE applies the GTE predicate on the "last_push" field.
- func LastPushGTE(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldLastPush), v))
- })
- }
- // LastPushLT applies the LT predicate on the "last_push" field.
- func LastPushLT(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldLastPush), v))
- })
- }
- // LastPushLTE applies the LTE predicate on the "last_push" field.
- func LastPushLTE(v time.Time) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldLastPush), v))
- })
- }
- // LastPushIsNil applies the IsNil predicate on the "last_push" field.
- func LastPushIsNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.IsNull(s.C(FieldLastPush)))
- })
- }
- // LastPushNotNil applies the NotNil predicate on the "last_push" field.
- func LastPushNotNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NotNull(s.C(FieldLastPush)))
- })
- }
- // MachineIdEQ applies the EQ predicate on the "machineId" field.
- func MachineIdEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldMachineId), v))
- })
- }
- // MachineIdNEQ applies the NEQ predicate on the "machineId" field.
- func MachineIdNEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldMachineId), v))
- })
- }
- // MachineIdIn applies the In predicate on the "machineId" field.
- func MachineIdIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldMachineId), v...))
- })
- }
- // MachineIdNotIn applies the NotIn predicate on the "machineId" field.
- func MachineIdNotIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldMachineId), v...))
- })
- }
- // MachineIdGT applies the GT predicate on the "machineId" field.
- func MachineIdGT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldMachineId), v))
- })
- }
- // MachineIdGTE applies the GTE predicate on the "machineId" field.
- func MachineIdGTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldMachineId), v))
- })
- }
- // MachineIdLT applies the LT predicate on the "machineId" field.
- func MachineIdLT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldMachineId), v))
- })
- }
- // MachineIdLTE applies the LTE predicate on the "machineId" field.
- func MachineIdLTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldMachineId), v))
- })
- }
- // MachineIdContains applies the Contains predicate on the "machineId" field.
- func MachineIdContains(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.Contains(s.C(FieldMachineId), v))
- })
- }
- // MachineIdHasPrefix applies the HasPrefix predicate on the "machineId" field.
- func MachineIdHasPrefix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasPrefix(s.C(FieldMachineId), v))
- })
- }
- // MachineIdHasSuffix applies the HasSuffix predicate on the "machineId" field.
- func MachineIdHasSuffix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasSuffix(s.C(FieldMachineId), v))
- })
- }
- // MachineIdEqualFold applies the EqualFold predicate on the "machineId" field.
- func MachineIdEqualFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EqualFold(s.C(FieldMachineId), v))
- })
- }
- // MachineIdContainsFold applies the ContainsFold predicate on the "machineId" field.
- func MachineIdContainsFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.ContainsFold(s.C(FieldMachineId), v))
- })
- }
- // PasswordEQ applies the EQ predicate on the "password" field.
- func PasswordEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldPassword), v))
- })
- }
- // PasswordNEQ applies the NEQ predicate on the "password" field.
- func PasswordNEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldPassword), v))
- })
- }
- // PasswordIn applies the In predicate on the "password" field.
- func PasswordIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldPassword), v...))
- })
- }
- // PasswordNotIn applies the NotIn predicate on the "password" field.
- func PasswordNotIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldPassword), v...))
- })
- }
- // PasswordGT applies the GT predicate on the "password" field.
- func PasswordGT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldPassword), v))
- })
- }
- // PasswordGTE applies the GTE predicate on the "password" field.
- func PasswordGTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldPassword), v))
- })
- }
- // PasswordLT applies the LT predicate on the "password" field.
- func PasswordLT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldPassword), v))
- })
- }
- // PasswordLTE applies the LTE predicate on the "password" field.
- func PasswordLTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldPassword), v))
- })
- }
- // PasswordContains applies the Contains predicate on the "password" field.
- func PasswordContains(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.Contains(s.C(FieldPassword), v))
- })
- }
- // PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
- func PasswordHasPrefix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasPrefix(s.C(FieldPassword), v))
- })
- }
- // PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
- func PasswordHasSuffix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasSuffix(s.C(FieldPassword), v))
- })
- }
- // PasswordEqualFold applies the EqualFold predicate on the "password" field.
- func PasswordEqualFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EqualFold(s.C(FieldPassword), v))
- })
- }
- // PasswordContainsFold applies the ContainsFold predicate on the "password" field.
- func PasswordContainsFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.ContainsFold(s.C(FieldPassword), v))
- })
- }
- // IpAddressEQ applies the EQ predicate on the "ipAddress" field.
- func IpAddressEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressNEQ applies the NEQ predicate on the "ipAddress" field.
- func IpAddressNEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressIn applies the In predicate on the "ipAddress" field.
- func IpAddressIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldIpAddress), v...))
- })
- }
- // IpAddressNotIn applies the NotIn predicate on the "ipAddress" field.
- func IpAddressNotIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldIpAddress), v...))
- })
- }
- // IpAddressGT applies the GT predicate on the "ipAddress" field.
- func IpAddressGT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressGTE applies the GTE predicate on the "ipAddress" field.
- func IpAddressGTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressLT applies the LT predicate on the "ipAddress" field.
- func IpAddressLT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressLTE applies the LTE predicate on the "ipAddress" field.
- func IpAddressLTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressContains applies the Contains predicate on the "ipAddress" field.
- func IpAddressContains(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.Contains(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressHasPrefix applies the HasPrefix predicate on the "ipAddress" field.
- func IpAddressHasPrefix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasPrefix(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressHasSuffix applies the HasSuffix predicate on the "ipAddress" field.
- func IpAddressHasSuffix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasSuffix(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressEqualFold applies the EqualFold predicate on the "ipAddress" field.
- func IpAddressEqualFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EqualFold(s.C(FieldIpAddress), v))
- })
- }
- // IpAddressContainsFold applies the ContainsFold predicate on the "ipAddress" field.
- func IpAddressContainsFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.ContainsFold(s.C(FieldIpAddress), v))
- })
- }
- // ScenariosEQ applies the EQ predicate on the "scenarios" field.
- func ScenariosEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldScenarios), v))
- })
- }
- // ScenariosNEQ applies the NEQ predicate on the "scenarios" field.
- func ScenariosNEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldScenarios), v))
- })
- }
- // ScenariosIn applies the In predicate on the "scenarios" field.
- func ScenariosIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldScenarios), v...))
- })
- }
- // ScenariosNotIn applies the NotIn predicate on the "scenarios" field.
- func ScenariosNotIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldScenarios), v...))
- })
- }
- // ScenariosGT applies the GT predicate on the "scenarios" field.
- func ScenariosGT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldScenarios), v))
- })
- }
- // ScenariosGTE applies the GTE predicate on the "scenarios" field.
- func ScenariosGTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldScenarios), v))
- })
- }
- // ScenariosLT applies the LT predicate on the "scenarios" field.
- func ScenariosLT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldScenarios), v))
- })
- }
- // ScenariosLTE applies the LTE predicate on the "scenarios" field.
- func ScenariosLTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldScenarios), v))
- })
- }
- // ScenariosContains applies the Contains predicate on the "scenarios" field.
- func ScenariosContains(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.Contains(s.C(FieldScenarios), v))
- })
- }
- // ScenariosHasPrefix applies the HasPrefix predicate on the "scenarios" field.
- func ScenariosHasPrefix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasPrefix(s.C(FieldScenarios), v))
- })
- }
- // ScenariosHasSuffix applies the HasSuffix predicate on the "scenarios" field.
- func ScenariosHasSuffix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasSuffix(s.C(FieldScenarios), v))
- })
- }
- // ScenariosIsNil applies the IsNil predicate on the "scenarios" field.
- func ScenariosIsNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.IsNull(s.C(FieldScenarios)))
- })
- }
- // ScenariosNotNil applies the NotNil predicate on the "scenarios" field.
- func ScenariosNotNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NotNull(s.C(FieldScenarios)))
- })
- }
- // ScenariosEqualFold applies the EqualFold predicate on the "scenarios" field.
- func ScenariosEqualFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EqualFold(s.C(FieldScenarios), v))
- })
- }
- // ScenariosContainsFold applies the ContainsFold predicate on the "scenarios" field.
- func ScenariosContainsFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.ContainsFold(s.C(FieldScenarios), v))
- })
- }
- // VersionEQ applies the EQ predicate on the "version" field.
- func VersionEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldVersion), v))
- })
- }
- // VersionNEQ applies the NEQ predicate on the "version" field.
- func VersionNEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldVersion), v))
- })
- }
- // VersionIn applies the In predicate on the "version" field.
- func VersionIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldVersion), v...))
- })
- }
- // VersionNotIn applies the NotIn predicate on the "version" field.
- func VersionNotIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldVersion), v...))
- })
- }
- // VersionGT applies the GT predicate on the "version" field.
- func VersionGT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldVersion), v))
- })
- }
- // VersionGTE applies the GTE predicate on the "version" field.
- func VersionGTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldVersion), v))
- })
- }
- // VersionLT applies the LT predicate on the "version" field.
- func VersionLT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldVersion), v))
- })
- }
- // VersionLTE applies the LTE predicate on the "version" field.
- func VersionLTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldVersion), v))
- })
- }
- // VersionContains applies the Contains predicate on the "version" field.
- func VersionContains(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.Contains(s.C(FieldVersion), v))
- })
- }
- // VersionHasPrefix applies the HasPrefix predicate on the "version" field.
- func VersionHasPrefix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasPrefix(s.C(FieldVersion), v))
- })
- }
- // VersionHasSuffix applies the HasSuffix predicate on the "version" field.
- func VersionHasSuffix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasSuffix(s.C(FieldVersion), v))
- })
- }
- // VersionIsNil applies the IsNil predicate on the "version" field.
- func VersionIsNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.IsNull(s.C(FieldVersion)))
- })
- }
- // VersionNotNil applies the NotNil predicate on the "version" field.
- func VersionNotNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NotNull(s.C(FieldVersion)))
- })
- }
- // VersionEqualFold applies the EqualFold predicate on the "version" field.
- func VersionEqualFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EqualFold(s.C(FieldVersion), v))
- })
- }
- // VersionContainsFold applies the ContainsFold predicate on the "version" field.
- func VersionContainsFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.ContainsFold(s.C(FieldVersion), v))
- })
- }
- // IsValidatedEQ applies the EQ predicate on the "isValidated" field.
- func IsValidatedEQ(v bool) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldIsValidated), v))
- })
- }
- // IsValidatedNEQ applies the NEQ predicate on the "isValidated" field.
- func IsValidatedNEQ(v bool) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldIsValidated), v))
- })
- }
- // StatusEQ applies the EQ predicate on the "status" field.
- func StatusEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EQ(s.C(FieldStatus), v))
- })
- }
- // StatusNEQ applies the NEQ predicate on the "status" field.
- func StatusNEQ(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NEQ(s.C(FieldStatus), v))
- })
- }
- // StatusIn applies the In predicate on the "status" field.
- func StatusIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.In(s.C(FieldStatus), v...))
- })
- }
- // StatusNotIn applies the NotIn predicate on the "status" field.
- func StatusNotIn(vs ...string) predicate.Machine {
- v := make([]interface{}, len(vs))
- for i := range v {
- v[i] = vs[i]
- }
- return predicate.Machine(func(s *sql.Selector) {
- // if not arguments were provided, append the FALSE constants,
- // since we can't apply "IN ()". This will make this predicate falsy.
- if len(v) == 0 {
- s.Where(sql.False())
- return
- }
- s.Where(sql.NotIn(s.C(FieldStatus), v...))
- })
- }
- // StatusGT applies the GT predicate on the "status" field.
- func StatusGT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GT(s.C(FieldStatus), v))
- })
- }
- // StatusGTE applies the GTE predicate on the "status" field.
- func StatusGTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.GTE(s.C(FieldStatus), v))
- })
- }
- // StatusLT applies the LT predicate on the "status" field.
- func StatusLT(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LT(s.C(FieldStatus), v))
- })
- }
- // StatusLTE applies the LTE predicate on the "status" field.
- func StatusLTE(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.LTE(s.C(FieldStatus), v))
- })
- }
- // StatusContains applies the Contains predicate on the "status" field.
- func StatusContains(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.Contains(s.C(FieldStatus), v))
- })
- }
- // StatusHasPrefix applies the HasPrefix predicate on the "status" field.
- func StatusHasPrefix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasPrefix(s.C(FieldStatus), v))
- })
- }
- // StatusHasSuffix applies the HasSuffix predicate on the "status" field.
- func StatusHasSuffix(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.HasSuffix(s.C(FieldStatus), v))
- })
- }
- // StatusIsNil applies the IsNil predicate on the "status" field.
- func StatusIsNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.IsNull(s.C(FieldStatus)))
- })
- }
- // StatusNotNil applies the NotNil predicate on the "status" field.
- func StatusNotNil() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.NotNull(s.C(FieldStatus)))
- })
- }
- // StatusEqualFold applies the EqualFold predicate on the "status" field.
- func StatusEqualFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.EqualFold(s.C(FieldStatus), v))
- })
- }
- // StatusContainsFold applies the ContainsFold predicate on the "status" field.
- func StatusContainsFold(v string) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- s.Where(sql.ContainsFold(s.C(FieldStatus), v))
- })
- }
- // HasAlerts applies the HasEdge predicate on the "alerts" edge.
- func HasAlerts() predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- step := sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.To(AlertsTable, FieldID),
- sqlgraph.Edge(sqlgraph.O2M, false, AlertsTable, AlertsColumn),
- )
- sqlgraph.HasNeighbors(s, step)
- })
- }
- // HasAlertsWith applies the HasEdge predicate on the "alerts" edge with a given conditions (other predicates).
- func HasAlertsWith(preds ...predicate.Alert) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- step := sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.To(AlertsInverseTable, FieldID),
- sqlgraph.Edge(sqlgraph.O2M, false, AlertsTable, AlertsColumn),
- )
- 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.Machine) predicate.Machine {
- return predicate.Machine(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.Machine) predicate.Machine {
- return predicate.Machine(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.Machine) predicate.Machine {
- return predicate.Machine(func(s *sql.Selector) {
- p(s.Not())
- })
- }
|