github.com/crowdsecurity/crowdsec@v1.6.1/pkg/database/ent/lock/where.go (about)

     1  // Code generated by ent, DO NOT EDIT.
     2  
     3  package lock
     4  
     5  import (
     6  	"time"
     7  
     8  	"entgo.io/ent/dialect/sql"
     9  	"github.com/crowdsecurity/crowdsec/pkg/database/ent/predicate"
    10  )
    11  
    12  // ID filters vertices based on their ID field.
    13  func ID(id int) predicate.Lock {
    14  	return predicate.Lock(sql.FieldEQ(FieldID, id))
    15  }
    16  
    17  // IDEQ applies the EQ predicate on the ID field.
    18  func IDEQ(id int) predicate.Lock {
    19  	return predicate.Lock(sql.FieldEQ(FieldID, id))
    20  }
    21  
    22  // IDNEQ applies the NEQ predicate on the ID field.
    23  func IDNEQ(id int) predicate.Lock {
    24  	return predicate.Lock(sql.FieldNEQ(FieldID, id))
    25  }
    26  
    27  // IDIn applies the In predicate on the ID field.
    28  func IDIn(ids ...int) predicate.Lock {
    29  	return predicate.Lock(sql.FieldIn(FieldID, ids...))
    30  }
    31  
    32  // IDNotIn applies the NotIn predicate on the ID field.
    33  func IDNotIn(ids ...int) predicate.Lock {
    34  	return predicate.Lock(sql.FieldNotIn(FieldID, ids...))
    35  }
    36  
    37  // IDGT applies the GT predicate on the ID field.
    38  func IDGT(id int) predicate.Lock {
    39  	return predicate.Lock(sql.FieldGT(FieldID, id))
    40  }
    41  
    42  // IDGTE applies the GTE predicate on the ID field.
    43  func IDGTE(id int) predicate.Lock {
    44  	return predicate.Lock(sql.FieldGTE(FieldID, id))
    45  }
    46  
    47  // IDLT applies the LT predicate on the ID field.
    48  func IDLT(id int) predicate.Lock {
    49  	return predicate.Lock(sql.FieldLT(FieldID, id))
    50  }
    51  
    52  // IDLTE applies the LTE predicate on the ID field.
    53  func IDLTE(id int) predicate.Lock {
    54  	return predicate.Lock(sql.FieldLTE(FieldID, id))
    55  }
    56  
    57  // Name applies equality check predicate on the "name" field. It's identical to NameEQ.
    58  func Name(v string) predicate.Lock {
    59  	return predicate.Lock(sql.FieldEQ(FieldName, v))
    60  }
    61  
    62  // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
    63  func CreatedAt(v time.Time) predicate.Lock {
    64  	return predicate.Lock(sql.FieldEQ(FieldCreatedAt, v))
    65  }
    66  
    67  // NameEQ applies the EQ predicate on the "name" field.
    68  func NameEQ(v string) predicate.Lock {
    69  	return predicate.Lock(sql.FieldEQ(FieldName, v))
    70  }
    71  
    72  // NameNEQ applies the NEQ predicate on the "name" field.
    73  func NameNEQ(v string) predicate.Lock {
    74  	return predicate.Lock(sql.FieldNEQ(FieldName, v))
    75  }
    76  
    77  // NameIn applies the In predicate on the "name" field.
    78  func NameIn(vs ...string) predicate.Lock {
    79  	return predicate.Lock(sql.FieldIn(FieldName, vs...))
    80  }
    81  
    82  // NameNotIn applies the NotIn predicate on the "name" field.
    83  func NameNotIn(vs ...string) predicate.Lock {
    84  	return predicate.Lock(sql.FieldNotIn(FieldName, vs...))
    85  }
    86  
    87  // NameGT applies the GT predicate on the "name" field.
    88  func NameGT(v string) predicate.Lock {
    89  	return predicate.Lock(sql.FieldGT(FieldName, v))
    90  }
    91  
    92  // NameGTE applies the GTE predicate on the "name" field.
    93  func NameGTE(v string) predicate.Lock {
    94  	return predicate.Lock(sql.FieldGTE(FieldName, v))
    95  }
    96  
    97  // NameLT applies the LT predicate on the "name" field.
    98  func NameLT(v string) predicate.Lock {
    99  	return predicate.Lock(sql.FieldLT(FieldName, v))
   100  }
   101  
   102  // NameLTE applies the LTE predicate on the "name" field.
   103  func NameLTE(v string) predicate.Lock {
   104  	return predicate.Lock(sql.FieldLTE(FieldName, v))
   105  }
   106  
   107  // NameContains applies the Contains predicate on the "name" field.
   108  func NameContains(v string) predicate.Lock {
   109  	return predicate.Lock(sql.FieldContains(FieldName, v))
   110  }
   111  
   112  // NameHasPrefix applies the HasPrefix predicate on the "name" field.
   113  func NameHasPrefix(v string) predicate.Lock {
   114  	return predicate.Lock(sql.FieldHasPrefix(FieldName, v))
   115  }
   116  
   117  // NameHasSuffix applies the HasSuffix predicate on the "name" field.
   118  func NameHasSuffix(v string) predicate.Lock {
   119  	return predicate.Lock(sql.FieldHasSuffix(FieldName, v))
   120  }
   121  
   122  // NameEqualFold applies the EqualFold predicate on the "name" field.
   123  func NameEqualFold(v string) predicate.Lock {
   124  	return predicate.Lock(sql.FieldEqualFold(FieldName, v))
   125  }
   126  
   127  // NameContainsFold applies the ContainsFold predicate on the "name" field.
   128  func NameContainsFold(v string) predicate.Lock {
   129  	return predicate.Lock(sql.FieldContainsFold(FieldName, v))
   130  }
   131  
   132  // CreatedAtEQ applies the EQ predicate on the "created_at" field.
   133  func CreatedAtEQ(v time.Time) predicate.Lock {
   134  	return predicate.Lock(sql.FieldEQ(FieldCreatedAt, v))
   135  }
   136  
   137  // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
   138  func CreatedAtNEQ(v time.Time) predicate.Lock {
   139  	return predicate.Lock(sql.FieldNEQ(FieldCreatedAt, v))
   140  }
   141  
   142  // CreatedAtIn applies the In predicate on the "created_at" field.
   143  func CreatedAtIn(vs ...time.Time) predicate.Lock {
   144  	return predicate.Lock(sql.FieldIn(FieldCreatedAt, vs...))
   145  }
   146  
   147  // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
   148  func CreatedAtNotIn(vs ...time.Time) predicate.Lock {
   149  	return predicate.Lock(sql.FieldNotIn(FieldCreatedAt, vs...))
   150  }
   151  
   152  // CreatedAtGT applies the GT predicate on the "created_at" field.
   153  func CreatedAtGT(v time.Time) predicate.Lock {
   154  	return predicate.Lock(sql.FieldGT(FieldCreatedAt, v))
   155  }
   156  
   157  // CreatedAtGTE applies the GTE predicate on the "created_at" field.
   158  func CreatedAtGTE(v time.Time) predicate.Lock {
   159  	return predicate.Lock(sql.FieldGTE(FieldCreatedAt, v))
   160  }
   161  
   162  // CreatedAtLT applies the LT predicate on the "created_at" field.
   163  func CreatedAtLT(v time.Time) predicate.Lock {
   164  	return predicate.Lock(sql.FieldLT(FieldCreatedAt, v))
   165  }
   166  
   167  // CreatedAtLTE applies the LTE predicate on the "created_at" field.
   168  func CreatedAtLTE(v time.Time) predicate.Lock {
   169  	return predicate.Lock(sql.FieldLTE(FieldCreatedAt, v))
   170  }
   171  
   172  // And groups predicates with the AND operator between them.
   173  func And(predicates ...predicate.Lock) predicate.Lock {
   174  	return predicate.Lock(sql.AndPredicates(predicates...))
   175  }
   176  
   177  // Or groups predicates with the OR operator between them.
   178  func Or(predicates ...predicate.Lock) predicate.Lock {
   179  	return predicate.Lock(sql.OrPredicates(predicates...))
   180  }
   181  
   182  // Not applies the not operator on the given predicate.
   183  func Not(p predicate.Lock) predicate.Lock {
   184  	return predicate.Lock(sql.NotPredicates(p))
   185  }