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

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