bitbucket.org/Aishee/synsec@v0.0.0-20210414005726-236fc01a153d/pkg/database/ent/machine/where.go (about)

     1  // Code generated by entc, DO NOT EDIT.
     2  
     3  package machine
     4  
     5  import (
     6  	"time"
     7  
     8  	"entgo.io/ent/dialect/sql"
     9  	"entgo.io/ent/dialect/sql/sqlgraph"
    10  	"bitbucket.org/Aishee/synsec/pkg/database/ent/predicate"
    11  )
    12  
    13  // ID filters vertices based on their ID field.
    14  func ID(id int) predicate.Machine {
    15  	return predicate.Machine(func(s *sql.Selector) {
    16  		s.Where(sql.EQ(s.C(FieldID), id))
    17  	})
    18  }
    19  
    20  // IDEQ applies the EQ predicate on the ID field.
    21  func IDEQ(id int) predicate.Machine {
    22  	return predicate.Machine(func(s *sql.Selector) {
    23  		s.Where(sql.EQ(s.C(FieldID), id))
    24  	})
    25  }
    26  
    27  // IDNEQ applies the NEQ predicate on the ID field.
    28  func IDNEQ(id int) predicate.Machine {
    29  	return predicate.Machine(func(s *sql.Selector) {
    30  		s.Where(sql.NEQ(s.C(FieldID), id))
    31  	})
    32  }
    33  
    34  // IDIn applies the In predicate on the ID field.
    35  func IDIn(ids ...int) predicate.Machine {
    36  	return predicate.Machine(func(s *sql.Selector) {
    37  		// if not arguments were provided, append the FALSE constants,
    38  		// since we can't apply "IN ()". This will make this predicate falsy.
    39  		if len(ids) == 0 {
    40  			s.Where(sql.False())
    41  			return
    42  		}
    43  		v := make([]interface{}, len(ids))
    44  		for i := range v {
    45  			v[i] = ids[i]
    46  		}
    47  		s.Where(sql.In(s.C(FieldID), v...))
    48  	})
    49  }
    50  
    51  // IDNotIn applies the NotIn predicate on the ID field.
    52  func IDNotIn(ids ...int) predicate.Machine {
    53  	return predicate.Machine(func(s *sql.Selector) {
    54  		// if not arguments were provided, append the FALSE constants,
    55  		// since we can't apply "IN ()". This will make this predicate falsy.
    56  		if len(ids) == 0 {
    57  			s.Where(sql.False())
    58  			return
    59  		}
    60  		v := make([]interface{}, len(ids))
    61  		for i := range v {
    62  			v[i] = ids[i]
    63  		}
    64  		s.Where(sql.NotIn(s.C(FieldID), v...))
    65  	})
    66  }
    67  
    68  // IDGT applies the GT predicate on the ID field.
    69  func IDGT(id int) predicate.Machine {
    70  	return predicate.Machine(func(s *sql.Selector) {
    71  		s.Where(sql.GT(s.C(FieldID), id))
    72  	})
    73  }
    74  
    75  // IDGTE applies the GTE predicate on the ID field.
    76  func IDGTE(id int) predicate.Machine {
    77  	return predicate.Machine(func(s *sql.Selector) {
    78  		s.Where(sql.GTE(s.C(FieldID), id))
    79  	})
    80  }
    81  
    82  // IDLT applies the LT predicate on the ID field.
    83  func IDLT(id int) predicate.Machine {
    84  	return predicate.Machine(func(s *sql.Selector) {
    85  		s.Where(sql.LT(s.C(FieldID), id))
    86  	})
    87  }
    88  
    89  // IDLTE applies the LTE predicate on the ID field.
    90  func IDLTE(id int) predicate.Machine {
    91  	return predicate.Machine(func(s *sql.Selector) {
    92  		s.Where(sql.LTE(s.C(FieldID), id))
    93  	})
    94  }
    95  
    96  // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
    97  func CreatedAt(v time.Time) predicate.Machine {
    98  	return predicate.Machine(func(s *sql.Selector) {
    99  		s.Where(sql.EQ(s.C(FieldCreatedAt), v))
   100  	})
   101  }
   102  
   103  // UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
   104  func UpdatedAt(v time.Time) predicate.Machine {
   105  	return predicate.Machine(func(s *sql.Selector) {
   106  		s.Where(sql.EQ(s.C(FieldUpdatedAt), v))
   107  	})
   108  }
   109  
   110  // MachineId applies equality check predicate on the "machineId" field. It's identical to MachineIdEQ.
   111  func MachineId(v string) predicate.Machine {
   112  	return predicate.Machine(func(s *sql.Selector) {
   113  		s.Where(sql.EQ(s.C(FieldMachineId), v))
   114  	})
   115  }
   116  
   117  // Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
   118  func Password(v string) predicate.Machine {
   119  	return predicate.Machine(func(s *sql.Selector) {
   120  		s.Where(sql.EQ(s.C(FieldPassword), v))
   121  	})
   122  }
   123  
   124  // IpAddress applies equality check predicate on the "ipAddress" field. It's identical to IpAddressEQ.
   125  func IpAddress(v string) predicate.Machine {
   126  	return predicate.Machine(func(s *sql.Selector) {
   127  		s.Where(sql.EQ(s.C(FieldIpAddress), v))
   128  	})
   129  }
   130  
   131  // Scenarios applies equality check predicate on the "scenarios" field. It's identical to ScenariosEQ.
   132  func Scenarios(v string) predicate.Machine {
   133  	return predicate.Machine(func(s *sql.Selector) {
   134  		s.Where(sql.EQ(s.C(FieldScenarios), v))
   135  	})
   136  }
   137  
   138  // Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
   139  func Version(v string) predicate.Machine {
   140  	return predicate.Machine(func(s *sql.Selector) {
   141  		s.Where(sql.EQ(s.C(FieldVersion), v))
   142  	})
   143  }
   144  
   145  // IsValidated applies equality check predicate on the "isValidated" field. It's identical to IsValidatedEQ.
   146  func IsValidated(v bool) predicate.Machine {
   147  	return predicate.Machine(func(s *sql.Selector) {
   148  		s.Where(sql.EQ(s.C(FieldIsValidated), v))
   149  	})
   150  }
   151  
   152  // Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
   153  func Status(v string) predicate.Machine {
   154  	return predicate.Machine(func(s *sql.Selector) {
   155  		s.Where(sql.EQ(s.C(FieldStatus), v))
   156  	})
   157  }
   158  
   159  // CreatedAtEQ applies the EQ predicate on the "created_at" field.
   160  func CreatedAtEQ(v time.Time) predicate.Machine {
   161  	return predicate.Machine(func(s *sql.Selector) {
   162  		s.Where(sql.EQ(s.C(FieldCreatedAt), v))
   163  	})
   164  }
   165  
   166  // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
   167  func CreatedAtNEQ(v time.Time) predicate.Machine {
   168  	return predicate.Machine(func(s *sql.Selector) {
   169  		s.Where(sql.NEQ(s.C(FieldCreatedAt), v))
   170  	})
   171  }
   172  
   173  // CreatedAtIn applies the In predicate on the "created_at" field.
   174  func CreatedAtIn(vs ...time.Time) predicate.Machine {
   175  	v := make([]interface{}, len(vs))
   176  	for i := range v {
   177  		v[i] = vs[i]
   178  	}
   179  	return predicate.Machine(func(s *sql.Selector) {
   180  		// if not arguments were provided, append the FALSE constants,
   181  		// since we can't apply "IN ()". This will make this predicate falsy.
   182  		if len(v) == 0 {
   183  			s.Where(sql.False())
   184  			return
   185  		}
   186  		s.Where(sql.In(s.C(FieldCreatedAt), v...))
   187  	})
   188  }
   189  
   190  // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
   191  func CreatedAtNotIn(vs ...time.Time) predicate.Machine {
   192  	v := make([]interface{}, len(vs))
   193  	for i := range v {
   194  		v[i] = vs[i]
   195  	}
   196  	return predicate.Machine(func(s *sql.Selector) {
   197  		// if not arguments were provided, append the FALSE constants,
   198  		// since we can't apply "IN ()". This will make this predicate falsy.
   199  		if len(v) == 0 {
   200  			s.Where(sql.False())
   201  			return
   202  		}
   203  		s.Where(sql.NotIn(s.C(FieldCreatedAt), v...))
   204  	})
   205  }
   206  
   207  // CreatedAtGT applies the GT predicate on the "created_at" field.
   208  func CreatedAtGT(v time.Time) predicate.Machine {
   209  	return predicate.Machine(func(s *sql.Selector) {
   210  		s.Where(sql.GT(s.C(FieldCreatedAt), v))
   211  	})
   212  }
   213  
   214  // CreatedAtGTE applies the GTE predicate on the "created_at" field.
   215  func CreatedAtGTE(v time.Time) predicate.Machine {
   216  	return predicate.Machine(func(s *sql.Selector) {
   217  		s.Where(sql.GTE(s.C(FieldCreatedAt), v))
   218  	})
   219  }
   220  
   221  // CreatedAtLT applies the LT predicate on the "created_at" field.
   222  func CreatedAtLT(v time.Time) predicate.Machine {
   223  	return predicate.Machine(func(s *sql.Selector) {
   224  		s.Where(sql.LT(s.C(FieldCreatedAt), v))
   225  	})
   226  }
   227  
   228  // CreatedAtLTE applies the LTE predicate on the "created_at" field.
   229  func CreatedAtLTE(v time.Time) predicate.Machine {
   230  	return predicate.Machine(func(s *sql.Selector) {
   231  		s.Where(sql.LTE(s.C(FieldCreatedAt), v))
   232  	})
   233  }
   234  
   235  // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
   236  func UpdatedAtEQ(v time.Time) predicate.Machine {
   237  	return predicate.Machine(func(s *sql.Selector) {
   238  		s.Where(sql.EQ(s.C(FieldUpdatedAt), v))
   239  	})
   240  }
   241  
   242  // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
   243  func UpdatedAtNEQ(v time.Time) predicate.Machine {
   244  	return predicate.Machine(func(s *sql.Selector) {
   245  		s.Where(sql.NEQ(s.C(FieldUpdatedAt), v))
   246  	})
   247  }
   248  
   249  // UpdatedAtIn applies the In predicate on the "updated_at" field.
   250  func UpdatedAtIn(vs ...time.Time) predicate.Machine {
   251  	v := make([]interface{}, len(vs))
   252  	for i := range v {
   253  		v[i] = vs[i]
   254  	}
   255  	return predicate.Machine(func(s *sql.Selector) {
   256  		// if not arguments were provided, append the FALSE constants,
   257  		// since we can't apply "IN ()". This will make this predicate falsy.
   258  		if len(v) == 0 {
   259  			s.Where(sql.False())
   260  			return
   261  		}
   262  		s.Where(sql.In(s.C(FieldUpdatedAt), v...))
   263  	})
   264  }
   265  
   266  // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
   267  func UpdatedAtNotIn(vs ...time.Time) predicate.Machine {
   268  	v := make([]interface{}, len(vs))
   269  	for i := range v {
   270  		v[i] = vs[i]
   271  	}
   272  	return predicate.Machine(func(s *sql.Selector) {
   273  		// if not arguments were provided, append the FALSE constants,
   274  		// since we can't apply "IN ()". This will make this predicate falsy.
   275  		if len(v) == 0 {
   276  			s.Where(sql.False())
   277  			return
   278  		}
   279  		s.Where(sql.NotIn(s.C(FieldUpdatedAt), v...))
   280  	})
   281  }
   282  
   283  // UpdatedAtGT applies the GT predicate on the "updated_at" field.
   284  func UpdatedAtGT(v time.Time) predicate.Machine {
   285  	return predicate.Machine(func(s *sql.Selector) {
   286  		s.Where(sql.GT(s.C(FieldUpdatedAt), v))
   287  	})
   288  }
   289  
   290  // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
   291  func UpdatedAtGTE(v time.Time) predicate.Machine {
   292  	return predicate.Machine(func(s *sql.Selector) {
   293  		s.Where(sql.GTE(s.C(FieldUpdatedAt), v))
   294  	})
   295  }
   296  
   297  // UpdatedAtLT applies the LT predicate on the "updated_at" field.
   298  func UpdatedAtLT(v time.Time) predicate.Machine {
   299  	return predicate.Machine(func(s *sql.Selector) {
   300  		s.Where(sql.LT(s.C(FieldUpdatedAt), v))
   301  	})
   302  }
   303  
   304  // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
   305  func UpdatedAtLTE(v time.Time) predicate.Machine {
   306  	return predicate.Machine(func(s *sql.Selector) {
   307  		s.Where(sql.LTE(s.C(FieldUpdatedAt), v))
   308  	})
   309  }
   310  
   311  // MachineIdEQ applies the EQ predicate on the "machineId" field.
   312  func MachineIdEQ(v string) predicate.Machine {
   313  	return predicate.Machine(func(s *sql.Selector) {
   314  		s.Where(sql.EQ(s.C(FieldMachineId), v))
   315  	})
   316  }
   317  
   318  // MachineIdNEQ applies the NEQ predicate on the "machineId" field.
   319  func MachineIdNEQ(v string) predicate.Machine {
   320  	return predicate.Machine(func(s *sql.Selector) {
   321  		s.Where(sql.NEQ(s.C(FieldMachineId), v))
   322  	})
   323  }
   324  
   325  // MachineIdIn applies the In predicate on the "machineId" field.
   326  func MachineIdIn(vs ...string) predicate.Machine {
   327  	v := make([]interface{}, len(vs))
   328  	for i := range v {
   329  		v[i] = vs[i]
   330  	}
   331  	return predicate.Machine(func(s *sql.Selector) {
   332  		// if not arguments were provided, append the FALSE constants,
   333  		// since we can't apply "IN ()". This will make this predicate falsy.
   334  		if len(v) == 0 {
   335  			s.Where(sql.False())
   336  			return
   337  		}
   338  		s.Where(sql.In(s.C(FieldMachineId), v...))
   339  	})
   340  }
   341  
   342  // MachineIdNotIn applies the NotIn predicate on the "machineId" field.
   343  func MachineIdNotIn(vs ...string) predicate.Machine {
   344  	v := make([]interface{}, len(vs))
   345  	for i := range v {
   346  		v[i] = vs[i]
   347  	}
   348  	return predicate.Machine(func(s *sql.Selector) {
   349  		// if not arguments were provided, append the FALSE constants,
   350  		// since we can't apply "IN ()". This will make this predicate falsy.
   351  		if len(v) == 0 {
   352  			s.Where(sql.False())
   353  			return
   354  		}
   355  		s.Where(sql.NotIn(s.C(FieldMachineId), v...))
   356  	})
   357  }
   358  
   359  // MachineIdGT applies the GT predicate on the "machineId" field.
   360  func MachineIdGT(v string) predicate.Machine {
   361  	return predicate.Machine(func(s *sql.Selector) {
   362  		s.Where(sql.GT(s.C(FieldMachineId), v))
   363  	})
   364  }
   365  
   366  // MachineIdGTE applies the GTE predicate on the "machineId" field.
   367  func MachineIdGTE(v string) predicate.Machine {
   368  	return predicate.Machine(func(s *sql.Selector) {
   369  		s.Where(sql.GTE(s.C(FieldMachineId), v))
   370  	})
   371  }
   372  
   373  // MachineIdLT applies the LT predicate on the "machineId" field.
   374  func MachineIdLT(v string) predicate.Machine {
   375  	return predicate.Machine(func(s *sql.Selector) {
   376  		s.Where(sql.LT(s.C(FieldMachineId), v))
   377  	})
   378  }
   379  
   380  // MachineIdLTE applies the LTE predicate on the "machineId" field.
   381  func MachineIdLTE(v string) predicate.Machine {
   382  	return predicate.Machine(func(s *sql.Selector) {
   383  		s.Where(sql.LTE(s.C(FieldMachineId), v))
   384  	})
   385  }
   386  
   387  // MachineIdContains applies the Contains predicate on the "machineId" field.
   388  func MachineIdContains(v string) predicate.Machine {
   389  	return predicate.Machine(func(s *sql.Selector) {
   390  		s.Where(sql.Contains(s.C(FieldMachineId), v))
   391  	})
   392  }
   393  
   394  // MachineIdHasPrefix applies the HasPrefix predicate on the "machineId" field.
   395  func MachineIdHasPrefix(v string) predicate.Machine {
   396  	return predicate.Machine(func(s *sql.Selector) {
   397  		s.Where(sql.HasPrefix(s.C(FieldMachineId), v))
   398  	})
   399  }
   400  
   401  // MachineIdHasSuffix applies the HasSuffix predicate on the "machineId" field.
   402  func MachineIdHasSuffix(v string) predicate.Machine {
   403  	return predicate.Machine(func(s *sql.Selector) {
   404  		s.Where(sql.HasSuffix(s.C(FieldMachineId), v))
   405  	})
   406  }
   407  
   408  // MachineIdEqualFold applies the EqualFold predicate on the "machineId" field.
   409  func MachineIdEqualFold(v string) predicate.Machine {
   410  	return predicate.Machine(func(s *sql.Selector) {
   411  		s.Where(sql.EqualFold(s.C(FieldMachineId), v))
   412  	})
   413  }
   414  
   415  // MachineIdContainsFold applies the ContainsFold predicate on the "machineId" field.
   416  func MachineIdContainsFold(v string) predicate.Machine {
   417  	return predicate.Machine(func(s *sql.Selector) {
   418  		s.Where(sql.ContainsFold(s.C(FieldMachineId), v))
   419  	})
   420  }
   421  
   422  // PasswordEQ applies the EQ predicate on the "password" field.
   423  func PasswordEQ(v string) predicate.Machine {
   424  	return predicate.Machine(func(s *sql.Selector) {
   425  		s.Where(sql.EQ(s.C(FieldPassword), v))
   426  	})
   427  }
   428  
   429  // PasswordNEQ applies the NEQ predicate on the "password" field.
   430  func PasswordNEQ(v string) predicate.Machine {
   431  	return predicate.Machine(func(s *sql.Selector) {
   432  		s.Where(sql.NEQ(s.C(FieldPassword), v))
   433  	})
   434  }
   435  
   436  // PasswordIn applies the In predicate on the "password" field.
   437  func PasswordIn(vs ...string) predicate.Machine {
   438  	v := make([]interface{}, len(vs))
   439  	for i := range v {
   440  		v[i] = vs[i]
   441  	}
   442  	return predicate.Machine(func(s *sql.Selector) {
   443  		// if not arguments were provided, append the FALSE constants,
   444  		// since we can't apply "IN ()". This will make this predicate falsy.
   445  		if len(v) == 0 {
   446  			s.Where(sql.False())
   447  			return
   448  		}
   449  		s.Where(sql.In(s.C(FieldPassword), v...))
   450  	})
   451  }
   452  
   453  // PasswordNotIn applies the NotIn predicate on the "password" field.
   454  func PasswordNotIn(vs ...string) predicate.Machine {
   455  	v := make([]interface{}, len(vs))
   456  	for i := range v {
   457  		v[i] = vs[i]
   458  	}
   459  	return predicate.Machine(func(s *sql.Selector) {
   460  		// if not arguments were provided, append the FALSE constants,
   461  		// since we can't apply "IN ()". This will make this predicate falsy.
   462  		if len(v) == 0 {
   463  			s.Where(sql.False())
   464  			return
   465  		}
   466  		s.Where(sql.NotIn(s.C(FieldPassword), v...))
   467  	})
   468  }
   469  
   470  // PasswordGT applies the GT predicate on the "password" field.
   471  func PasswordGT(v string) predicate.Machine {
   472  	return predicate.Machine(func(s *sql.Selector) {
   473  		s.Where(sql.GT(s.C(FieldPassword), v))
   474  	})
   475  }
   476  
   477  // PasswordGTE applies the GTE predicate on the "password" field.
   478  func PasswordGTE(v string) predicate.Machine {
   479  	return predicate.Machine(func(s *sql.Selector) {
   480  		s.Where(sql.GTE(s.C(FieldPassword), v))
   481  	})
   482  }
   483  
   484  // PasswordLT applies the LT predicate on the "password" field.
   485  func PasswordLT(v string) predicate.Machine {
   486  	return predicate.Machine(func(s *sql.Selector) {
   487  		s.Where(sql.LT(s.C(FieldPassword), v))
   488  	})
   489  }
   490  
   491  // PasswordLTE applies the LTE predicate on the "password" field.
   492  func PasswordLTE(v string) predicate.Machine {
   493  	return predicate.Machine(func(s *sql.Selector) {
   494  		s.Where(sql.LTE(s.C(FieldPassword), v))
   495  	})
   496  }
   497  
   498  // PasswordContains applies the Contains predicate on the "password" field.
   499  func PasswordContains(v string) predicate.Machine {
   500  	return predicate.Machine(func(s *sql.Selector) {
   501  		s.Where(sql.Contains(s.C(FieldPassword), v))
   502  	})
   503  }
   504  
   505  // PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
   506  func PasswordHasPrefix(v string) predicate.Machine {
   507  	return predicate.Machine(func(s *sql.Selector) {
   508  		s.Where(sql.HasPrefix(s.C(FieldPassword), v))
   509  	})
   510  }
   511  
   512  // PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
   513  func PasswordHasSuffix(v string) predicate.Machine {
   514  	return predicate.Machine(func(s *sql.Selector) {
   515  		s.Where(sql.HasSuffix(s.C(FieldPassword), v))
   516  	})
   517  }
   518  
   519  // PasswordEqualFold applies the EqualFold predicate on the "password" field.
   520  func PasswordEqualFold(v string) predicate.Machine {
   521  	return predicate.Machine(func(s *sql.Selector) {
   522  		s.Where(sql.EqualFold(s.C(FieldPassword), v))
   523  	})
   524  }
   525  
   526  // PasswordContainsFold applies the ContainsFold predicate on the "password" field.
   527  func PasswordContainsFold(v string) predicate.Machine {
   528  	return predicate.Machine(func(s *sql.Selector) {
   529  		s.Where(sql.ContainsFold(s.C(FieldPassword), v))
   530  	})
   531  }
   532  
   533  // IpAddressEQ applies the EQ predicate on the "ipAddress" field.
   534  func IpAddressEQ(v string) predicate.Machine {
   535  	return predicate.Machine(func(s *sql.Selector) {
   536  		s.Where(sql.EQ(s.C(FieldIpAddress), v))
   537  	})
   538  }
   539  
   540  // IpAddressNEQ applies the NEQ predicate on the "ipAddress" field.
   541  func IpAddressNEQ(v string) predicate.Machine {
   542  	return predicate.Machine(func(s *sql.Selector) {
   543  		s.Where(sql.NEQ(s.C(FieldIpAddress), v))
   544  	})
   545  }
   546  
   547  // IpAddressIn applies the In predicate on the "ipAddress" field.
   548  func IpAddressIn(vs ...string) predicate.Machine {
   549  	v := make([]interface{}, len(vs))
   550  	for i := range v {
   551  		v[i] = vs[i]
   552  	}
   553  	return predicate.Machine(func(s *sql.Selector) {
   554  		// if not arguments were provided, append the FALSE constants,
   555  		// since we can't apply "IN ()". This will make this predicate falsy.
   556  		if len(v) == 0 {
   557  			s.Where(sql.False())
   558  			return
   559  		}
   560  		s.Where(sql.In(s.C(FieldIpAddress), v...))
   561  	})
   562  }
   563  
   564  // IpAddressNotIn applies the NotIn predicate on the "ipAddress" field.
   565  func IpAddressNotIn(vs ...string) predicate.Machine {
   566  	v := make([]interface{}, len(vs))
   567  	for i := range v {
   568  		v[i] = vs[i]
   569  	}
   570  	return predicate.Machine(func(s *sql.Selector) {
   571  		// if not arguments were provided, append the FALSE constants,
   572  		// since we can't apply "IN ()". This will make this predicate falsy.
   573  		if len(v) == 0 {
   574  			s.Where(sql.False())
   575  			return
   576  		}
   577  		s.Where(sql.NotIn(s.C(FieldIpAddress), v...))
   578  	})
   579  }
   580  
   581  // IpAddressGT applies the GT predicate on the "ipAddress" field.
   582  func IpAddressGT(v string) predicate.Machine {
   583  	return predicate.Machine(func(s *sql.Selector) {
   584  		s.Where(sql.GT(s.C(FieldIpAddress), v))
   585  	})
   586  }
   587  
   588  // IpAddressGTE applies the GTE predicate on the "ipAddress" field.
   589  func IpAddressGTE(v string) predicate.Machine {
   590  	return predicate.Machine(func(s *sql.Selector) {
   591  		s.Where(sql.GTE(s.C(FieldIpAddress), v))
   592  	})
   593  }
   594  
   595  // IpAddressLT applies the LT predicate on the "ipAddress" field.
   596  func IpAddressLT(v string) predicate.Machine {
   597  	return predicate.Machine(func(s *sql.Selector) {
   598  		s.Where(sql.LT(s.C(FieldIpAddress), v))
   599  	})
   600  }
   601  
   602  // IpAddressLTE applies the LTE predicate on the "ipAddress" field.
   603  func IpAddressLTE(v string) predicate.Machine {
   604  	return predicate.Machine(func(s *sql.Selector) {
   605  		s.Where(sql.LTE(s.C(FieldIpAddress), v))
   606  	})
   607  }
   608  
   609  // IpAddressContains applies the Contains predicate on the "ipAddress" field.
   610  func IpAddressContains(v string) predicate.Machine {
   611  	return predicate.Machine(func(s *sql.Selector) {
   612  		s.Where(sql.Contains(s.C(FieldIpAddress), v))
   613  	})
   614  }
   615  
   616  // IpAddressHasPrefix applies the HasPrefix predicate on the "ipAddress" field.
   617  func IpAddressHasPrefix(v string) predicate.Machine {
   618  	return predicate.Machine(func(s *sql.Selector) {
   619  		s.Where(sql.HasPrefix(s.C(FieldIpAddress), v))
   620  	})
   621  }
   622  
   623  // IpAddressHasSuffix applies the HasSuffix predicate on the "ipAddress" field.
   624  func IpAddressHasSuffix(v string) predicate.Machine {
   625  	return predicate.Machine(func(s *sql.Selector) {
   626  		s.Where(sql.HasSuffix(s.C(FieldIpAddress), v))
   627  	})
   628  }
   629  
   630  // IpAddressEqualFold applies the EqualFold predicate on the "ipAddress" field.
   631  func IpAddressEqualFold(v string) predicate.Machine {
   632  	return predicate.Machine(func(s *sql.Selector) {
   633  		s.Where(sql.EqualFold(s.C(FieldIpAddress), v))
   634  	})
   635  }
   636  
   637  // IpAddressContainsFold applies the ContainsFold predicate on the "ipAddress" field.
   638  func IpAddressContainsFold(v string) predicate.Machine {
   639  	return predicate.Machine(func(s *sql.Selector) {
   640  		s.Where(sql.ContainsFold(s.C(FieldIpAddress), v))
   641  	})
   642  }
   643  
   644  // ScenariosEQ applies the EQ predicate on the "scenarios" field.
   645  func ScenariosEQ(v string) predicate.Machine {
   646  	return predicate.Machine(func(s *sql.Selector) {
   647  		s.Where(sql.EQ(s.C(FieldScenarios), v))
   648  	})
   649  }
   650  
   651  // ScenariosNEQ applies the NEQ predicate on the "scenarios" field.
   652  func ScenariosNEQ(v string) predicate.Machine {
   653  	return predicate.Machine(func(s *sql.Selector) {
   654  		s.Where(sql.NEQ(s.C(FieldScenarios), v))
   655  	})
   656  }
   657  
   658  // ScenariosIn applies the In predicate on the "scenarios" field.
   659  func ScenariosIn(vs ...string) predicate.Machine {
   660  	v := make([]interface{}, len(vs))
   661  	for i := range v {
   662  		v[i] = vs[i]
   663  	}
   664  	return predicate.Machine(func(s *sql.Selector) {
   665  		// if not arguments were provided, append the FALSE constants,
   666  		// since we can't apply "IN ()". This will make this predicate falsy.
   667  		if len(v) == 0 {
   668  			s.Where(sql.False())
   669  			return
   670  		}
   671  		s.Where(sql.In(s.C(FieldScenarios), v...))
   672  	})
   673  }
   674  
   675  // ScenariosNotIn applies the NotIn predicate on the "scenarios" field.
   676  func ScenariosNotIn(vs ...string) predicate.Machine {
   677  	v := make([]interface{}, len(vs))
   678  	for i := range v {
   679  		v[i] = vs[i]
   680  	}
   681  	return predicate.Machine(func(s *sql.Selector) {
   682  		// if not arguments were provided, append the FALSE constants,
   683  		// since we can't apply "IN ()". This will make this predicate falsy.
   684  		if len(v) == 0 {
   685  			s.Where(sql.False())
   686  			return
   687  		}
   688  		s.Where(sql.NotIn(s.C(FieldScenarios), v...))
   689  	})
   690  }
   691  
   692  // ScenariosGT applies the GT predicate on the "scenarios" field.
   693  func ScenariosGT(v string) predicate.Machine {
   694  	return predicate.Machine(func(s *sql.Selector) {
   695  		s.Where(sql.GT(s.C(FieldScenarios), v))
   696  	})
   697  }
   698  
   699  // ScenariosGTE applies the GTE predicate on the "scenarios" field.
   700  func ScenariosGTE(v string) predicate.Machine {
   701  	return predicate.Machine(func(s *sql.Selector) {
   702  		s.Where(sql.GTE(s.C(FieldScenarios), v))
   703  	})
   704  }
   705  
   706  // ScenariosLT applies the LT predicate on the "scenarios" field.
   707  func ScenariosLT(v string) predicate.Machine {
   708  	return predicate.Machine(func(s *sql.Selector) {
   709  		s.Where(sql.LT(s.C(FieldScenarios), v))
   710  	})
   711  }
   712  
   713  // ScenariosLTE applies the LTE predicate on the "scenarios" field.
   714  func ScenariosLTE(v string) predicate.Machine {
   715  	return predicate.Machine(func(s *sql.Selector) {
   716  		s.Where(sql.LTE(s.C(FieldScenarios), v))
   717  	})
   718  }
   719  
   720  // ScenariosContains applies the Contains predicate on the "scenarios" field.
   721  func ScenariosContains(v string) predicate.Machine {
   722  	return predicate.Machine(func(s *sql.Selector) {
   723  		s.Where(sql.Contains(s.C(FieldScenarios), v))
   724  	})
   725  }
   726  
   727  // ScenariosHasPrefix applies the HasPrefix predicate on the "scenarios" field.
   728  func ScenariosHasPrefix(v string) predicate.Machine {
   729  	return predicate.Machine(func(s *sql.Selector) {
   730  		s.Where(sql.HasPrefix(s.C(FieldScenarios), v))
   731  	})
   732  }
   733  
   734  // ScenariosHasSuffix applies the HasSuffix predicate on the "scenarios" field.
   735  func ScenariosHasSuffix(v string) predicate.Machine {
   736  	return predicate.Machine(func(s *sql.Selector) {
   737  		s.Where(sql.HasSuffix(s.C(FieldScenarios), v))
   738  	})
   739  }
   740  
   741  // ScenariosIsNil applies the IsNil predicate on the "scenarios" field.
   742  func ScenariosIsNil() predicate.Machine {
   743  	return predicate.Machine(func(s *sql.Selector) {
   744  		s.Where(sql.IsNull(s.C(FieldScenarios)))
   745  	})
   746  }
   747  
   748  // ScenariosNotNil applies the NotNil predicate on the "scenarios" field.
   749  func ScenariosNotNil() predicate.Machine {
   750  	return predicate.Machine(func(s *sql.Selector) {
   751  		s.Where(sql.NotNull(s.C(FieldScenarios)))
   752  	})
   753  }
   754  
   755  // ScenariosEqualFold applies the EqualFold predicate on the "scenarios" field.
   756  func ScenariosEqualFold(v string) predicate.Machine {
   757  	return predicate.Machine(func(s *sql.Selector) {
   758  		s.Where(sql.EqualFold(s.C(FieldScenarios), v))
   759  	})
   760  }
   761  
   762  // ScenariosContainsFold applies the ContainsFold predicate on the "scenarios" field.
   763  func ScenariosContainsFold(v string) predicate.Machine {
   764  	return predicate.Machine(func(s *sql.Selector) {
   765  		s.Where(sql.ContainsFold(s.C(FieldScenarios), v))
   766  	})
   767  }
   768  
   769  // VersionEQ applies the EQ predicate on the "version" field.
   770  func VersionEQ(v string) predicate.Machine {
   771  	return predicate.Machine(func(s *sql.Selector) {
   772  		s.Where(sql.EQ(s.C(FieldVersion), v))
   773  	})
   774  }
   775  
   776  // VersionNEQ applies the NEQ predicate on the "version" field.
   777  func VersionNEQ(v string) predicate.Machine {
   778  	return predicate.Machine(func(s *sql.Selector) {
   779  		s.Where(sql.NEQ(s.C(FieldVersion), v))
   780  	})
   781  }
   782  
   783  // VersionIn applies the In predicate on the "version" field.
   784  func VersionIn(vs ...string) predicate.Machine {
   785  	v := make([]interface{}, len(vs))
   786  	for i := range v {
   787  		v[i] = vs[i]
   788  	}
   789  	return predicate.Machine(func(s *sql.Selector) {
   790  		// if not arguments were provided, append the FALSE constants,
   791  		// since we can't apply "IN ()". This will make this predicate falsy.
   792  		if len(v) == 0 {
   793  			s.Where(sql.False())
   794  			return
   795  		}
   796  		s.Where(sql.In(s.C(FieldVersion), v...))
   797  	})
   798  }
   799  
   800  // VersionNotIn applies the NotIn predicate on the "version" field.
   801  func VersionNotIn(vs ...string) predicate.Machine {
   802  	v := make([]interface{}, len(vs))
   803  	for i := range v {
   804  		v[i] = vs[i]
   805  	}
   806  	return predicate.Machine(func(s *sql.Selector) {
   807  		// if not arguments were provided, append the FALSE constants,
   808  		// since we can't apply "IN ()". This will make this predicate falsy.
   809  		if len(v) == 0 {
   810  			s.Where(sql.False())
   811  			return
   812  		}
   813  		s.Where(sql.NotIn(s.C(FieldVersion), v...))
   814  	})
   815  }
   816  
   817  // VersionGT applies the GT predicate on the "version" field.
   818  func VersionGT(v string) predicate.Machine {
   819  	return predicate.Machine(func(s *sql.Selector) {
   820  		s.Where(sql.GT(s.C(FieldVersion), v))
   821  	})
   822  }
   823  
   824  // VersionGTE applies the GTE predicate on the "version" field.
   825  func VersionGTE(v string) predicate.Machine {
   826  	return predicate.Machine(func(s *sql.Selector) {
   827  		s.Where(sql.GTE(s.C(FieldVersion), v))
   828  	})
   829  }
   830  
   831  // VersionLT applies the LT predicate on the "version" field.
   832  func VersionLT(v string) predicate.Machine {
   833  	return predicate.Machine(func(s *sql.Selector) {
   834  		s.Where(sql.LT(s.C(FieldVersion), v))
   835  	})
   836  }
   837  
   838  // VersionLTE applies the LTE predicate on the "version" field.
   839  func VersionLTE(v string) predicate.Machine {
   840  	return predicate.Machine(func(s *sql.Selector) {
   841  		s.Where(sql.LTE(s.C(FieldVersion), v))
   842  	})
   843  }
   844  
   845  // VersionContains applies the Contains predicate on the "version" field.
   846  func VersionContains(v string) predicate.Machine {
   847  	return predicate.Machine(func(s *sql.Selector) {
   848  		s.Where(sql.Contains(s.C(FieldVersion), v))
   849  	})
   850  }
   851  
   852  // VersionHasPrefix applies the HasPrefix predicate on the "version" field.
   853  func VersionHasPrefix(v string) predicate.Machine {
   854  	return predicate.Machine(func(s *sql.Selector) {
   855  		s.Where(sql.HasPrefix(s.C(FieldVersion), v))
   856  	})
   857  }
   858  
   859  // VersionHasSuffix applies the HasSuffix predicate on the "version" field.
   860  func VersionHasSuffix(v string) predicate.Machine {
   861  	return predicate.Machine(func(s *sql.Selector) {
   862  		s.Where(sql.HasSuffix(s.C(FieldVersion), v))
   863  	})
   864  }
   865  
   866  // VersionIsNil applies the IsNil predicate on the "version" field.
   867  func VersionIsNil() predicate.Machine {
   868  	return predicate.Machine(func(s *sql.Selector) {
   869  		s.Where(sql.IsNull(s.C(FieldVersion)))
   870  	})
   871  }
   872  
   873  // VersionNotNil applies the NotNil predicate on the "version" field.
   874  func VersionNotNil() predicate.Machine {
   875  	return predicate.Machine(func(s *sql.Selector) {
   876  		s.Where(sql.NotNull(s.C(FieldVersion)))
   877  	})
   878  }
   879  
   880  // VersionEqualFold applies the EqualFold predicate on the "version" field.
   881  func VersionEqualFold(v string) predicate.Machine {
   882  	return predicate.Machine(func(s *sql.Selector) {
   883  		s.Where(sql.EqualFold(s.C(FieldVersion), v))
   884  	})
   885  }
   886  
   887  // VersionContainsFold applies the ContainsFold predicate on the "version" field.
   888  func VersionContainsFold(v string) predicate.Machine {
   889  	return predicate.Machine(func(s *sql.Selector) {
   890  		s.Where(sql.ContainsFold(s.C(FieldVersion), v))
   891  	})
   892  }
   893  
   894  // IsValidatedEQ applies the EQ predicate on the "isValidated" field.
   895  func IsValidatedEQ(v bool) predicate.Machine {
   896  	return predicate.Machine(func(s *sql.Selector) {
   897  		s.Where(sql.EQ(s.C(FieldIsValidated), v))
   898  	})
   899  }
   900  
   901  // IsValidatedNEQ applies the NEQ predicate on the "isValidated" field.
   902  func IsValidatedNEQ(v bool) predicate.Machine {
   903  	return predicate.Machine(func(s *sql.Selector) {
   904  		s.Where(sql.NEQ(s.C(FieldIsValidated), v))
   905  	})
   906  }
   907  
   908  // StatusEQ applies the EQ predicate on the "status" field.
   909  func StatusEQ(v string) predicate.Machine {
   910  	return predicate.Machine(func(s *sql.Selector) {
   911  		s.Where(sql.EQ(s.C(FieldStatus), v))
   912  	})
   913  }
   914  
   915  // StatusNEQ applies the NEQ predicate on the "status" field.
   916  func StatusNEQ(v string) predicate.Machine {
   917  	return predicate.Machine(func(s *sql.Selector) {
   918  		s.Where(sql.NEQ(s.C(FieldStatus), v))
   919  	})
   920  }
   921  
   922  // StatusIn applies the In predicate on the "status" field.
   923  func StatusIn(vs ...string) predicate.Machine {
   924  	v := make([]interface{}, len(vs))
   925  	for i := range v {
   926  		v[i] = vs[i]
   927  	}
   928  	return predicate.Machine(func(s *sql.Selector) {
   929  		// if not arguments were provided, append the FALSE constants,
   930  		// since we can't apply "IN ()". This will make this predicate falsy.
   931  		if len(v) == 0 {
   932  			s.Where(sql.False())
   933  			return
   934  		}
   935  		s.Where(sql.In(s.C(FieldStatus), v...))
   936  	})
   937  }
   938  
   939  // StatusNotIn applies the NotIn predicate on the "status" field.
   940  func StatusNotIn(vs ...string) predicate.Machine {
   941  	v := make([]interface{}, len(vs))
   942  	for i := range v {
   943  		v[i] = vs[i]
   944  	}
   945  	return predicate.Machine(func(s *sql.Selector) {
   946  		// if not arguments were provided, append the FALSE constants,
   947  		// since we can't apply "IN ()". This will make this predicate falsy.
   948  		if len(v) == 0 {
   949  			s.Where(sql.False())
   950  			return
   951  		}
   952  		s.Where(sql.NotIn(s.C(FieldStatus), v...))
   953  	})
   954  }
   955  
   956  // StatusGT applies the GT predicate on the "status" field.
   957  func StatusGT(v string) predicate.Machine {
   958  	return predicate.Machine(func(s *sql.Selector) {
   959  		s.Where(sql.GT(s.C(FieldStatus), v))
   960  	})
   961  }
   962  
   963  // StatusGTE applies the GTE predicate on the "status" field.
   964  func StatusGTE(v string) predicate.Machine {
   965  	return predicate.Machine(func(s *sql.Selector) {
   966  		s.Where(sql.GTE(s.C(FieldStatus), v))
   967  	})
   968  }
   969  
   970  // StatusLT applies the LT predicate on the "status" field.
   971  func StatusLT(v string) predicate.Machine {
   972  	return predicate.Machine(func(s *sql.Selector) {
   973  		s.Where(sql.LT(s.C(FieldStatus), v))
   974  	})
   975  }
   976  
   977  // StatusLTE applies the LTE predicate on the "status" field.
   978  func StatusLTE(v string) predicate.Machine {
   979  	return predicate.Machine(func(s *sql.Selector) {
   980  		s.Where(sql.LTE(s.C(FieldStatus), v))
   981  	})
   982  }
   983  
   984  // StatusContains applies the Contains predicate on the "status" field.
   985  func StatusContains(v string) predicate.Machine {
   986  	return predicate.Machine(func(s *sql.Selector) {
   987  		s.Where(sql.Contains(s.C(FieldStatus), v))
   988  	})
   989  }
   990  
   991  // StatusHasPrefix applies the HasPrefix predicate on the "status" field.
   992  func StatusHasPrefix(v string) predicate.Machine {
   993  	return predicate.Machine(func(s *sql.Selector) {
   994  		s.Where(sql.HasPrefix(s.C(FieldStatus), v))
   995  	})
   996  }
   997  
   998  // StatusHasSuffix applies the HasSuffix predicate on the "status" field.
   999  func StatusHasSuffix(v string) predicate.Machine {
  1000  	return predicate.Machine(func(s *sql.Selector) {
  1001  		s.Where(sql.HasSuffix(s.C(FieldStatus), v))
  1002  	})
  1003  }
  1004  
  1005  // StatusIsNil applies the IsNil predicate on the "status" field.
  1006  func StatusIsNil() predicate.Machine {
  1007  	return predicate.Machine(func(s *sql.Selector) {
  1008  		s.Where(sql.IsNull(s.C(FieldStatus)))
  1009  	})
  1010  }
  1011  
  1012  // StatusNotNil applies the NotNil predicate on the "status" field.
  1013  func StatusNotNil() predicate.Machine {
  1014  	return predicate.Machine(func(s *sql.Selector) {
  1015  		s.Where(sql.NotNull(s.C(FieldStatus)))
  1016  	})
  1017  }
  1018  
  1019  // StatusEqualFold applies the EqualFold predicate on the "status" field.
  1020  func StatusEqualFold(v string) predicate.Machine {
  1021  	return predicate.Machine(func(s *sql.Selector) {
  1022  		s.Where(sql.EqualFold(s.C(FieldStatus), v))
  1023  	})
  1024  }
  1025  
  1026  // StatusContainsFold applies the ContainsFold predicate on the "status" field.
  1027  func StatusContainsFold(v string) predicate.Machine {
  1028  	return predicate.Machine(func(s *sql.Selector) {
  1029  		s.Where(sql.ContainsFold(s.C(FieldStatus), v))
  1030  	})
  1031  }
  1032  
  1033  // HasAlerts applies the HasEdge predicate on the "alerts" edge.
  1034  func HasAlerts() predicate.Machine {
  1035  	return predicate.Machine(func(s *sql.Selector) {
  1036  		step := sqlgraph.NewStep(
  1037  			sqlgraph.From(Table, FieldID),
  1038  			sqlgraph.To(AlertsTable, FieldID),
  1039  			sqlgraph.Edge(sqlgraph.O2M, false, AlertsTable, AlertsColumn),
  1040  		)
  1041  		sqlgraph.HasNeighbors(s, step)
  1042  	})
  1043  }
  1044  
  1045  // HasAlertsWith applies the HasEdge predicate on the "alerts" edge with a given conditions (other predicates).
  1046  func HasAlertsWith(preds ...predicate.Alert) predicate.Machine {
  1047  	return predicate.Machine(func(s *sql.Selector) {
  1048  		step := sqlgraph.NewStep(
  1049  			sqlgraph.From(Table, FieldID),
  1050  			sqlgraph.To(AlertsInverseTable, FieldID),
  1051  			sqlgraph.Edge(sqlgraph.O2M, false, AlertsTable, AlertsColumn),
  1052  		)
  1053  		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  1054  			for _, p := range preds {
  1055  				p(s)
  1056  			}
  1057  		})
  1058  	})
  1059  }
  1060  
  1061  // And groups predicates with the AND operator between them.
  1062  func And(predicates ...predicate.Machine) predicate.Machine {
  1063  	return predicate.Machine(func(s *sql.Selector) {
  1064  		s1 := s.Clone().SetP(nil)
  1065  		for _, p := range predicates {
  1066  			p(s1)
  1067  		}
  1068  		s.Where(s1.P())
  1069  	})
  1070  }
  1071  
  1072  // Or groups predicates with the OR operator between them.
  1073  func Or(predicates ...predicate.Machine) predicate.Machine {
  1074  	return predicate.Machine(func(s *sql.Selector) {
  1075  		s1 := s.Clone().SetP(nil)
  1076  		for i, p := range predicates {
  1077  			if i > 0 {
  1078  				s1.Or()
  1079  			}
  1080  			p(s1)
  1081  		}
  1082  		s.Where(s1.P())
  1083  	})
  1084  }
  1085  
  1086  // Not applies the not operator on the given predicate.
  1087  func Not(p predicate.Machine) predicate.Machine {
  1088  	return predicate.Machine(func(s *sql.Selector) {
  1089  		p(s.Not())
  1090  	})
  1091  }