// Code generated by ent, DO NOT EDIT. package searchquery import ( "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "git.dotya.ml/mirre-mt/pcmt/ent/predicate" "github.com/google/uuid" ) // ID filters vertices based on their ID field. func ID(id uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldID, id)) } // IDEQ applies the EQ predicate on the ID field. func IDEQ(id uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldID, id)) } // IDNEQ applies the NEQ predicate on the ID field. func IDNEQ(id uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNEQ(FieldID, id)) } // IDIn applies the In predicate on the ID field. func IDIn(ids ...uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldIn(FieldID, ids...)) } // IDNotIn applies the NotIn predicate on the ID field. func IDNotIn(ids ...uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNotIn(FieldID, ids...)) } // IDGT applies the GT predicate on the ID field. func IDGT(id uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldGT(FieldID, id)) } // IDGTE applies the GTE predicate on the ID field. func IDGTE(id uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldGTE(FieldID, id)) } // IDLT applies the LT predicate on the ID field. func IDLT(id uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldLT(FieldID, id)) } // IDLTE applies the LTE predicate on the ID field. func IDLTE(id uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldLTE(FieldID, id)) } // Query applies equality check predicate on the "query" field. It's identical to QueryEQ. func Query(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldQuery, v)) } // Created applies equality check predicate on the "created" field. It's identical to CreatedEQ. func Created(v time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldCreated, v)) } // Owner applies equality check predicate on the "owner" field. It's identical to OwnerEQ. func Owner(v uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldOwner, v)) } // QueryEQ applies the EQ predicate on the "query" field. func QueryEQ(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldQuery, v)) } // QueryNEQ applies the NEQ predicate on the "query" field. func QueryNEQ(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNEQ(FieldQuery, v)) } // QueryIn applies the In predicate on the "query" field. func QueryIn(vs ...string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldIn(FieldQuery, vs...)) } // QueryNotIn applies the NotIn predicate on the "query" field. func QueryNotIn(vs ...string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNotIn(FieldQuery, vs...)) } // QueryGT applies the GT predicate on the "query" field. func QueryGT(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldGT(FieldQuery, v)) } // QueryGTE applies the GTE predicate on the "query" field. func QueryGTE(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldGTE(FieldQuery, v)) } // QueryLT applies the LT predicate on the "query" field. func QueryLT(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldLT(FieldQuery, v)) } // QueryLTE applies the LTE predicate on the "query" field. func QueryLTE(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldLTE(FieldQuery, v)) } // QueryContains applies the Contains predicate on the "query" field. func QueryContains(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldContains(FieldQuery, v)) } // QueryHasPrefix applies the HasPrefix predicate on the "query" field. func QueryHasPrefix(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldHasPrefix(FieldQuery, v)) } // QueryHasSuffix applies the HasSuffix predicate on the "query" field. func QueryHasSuffix(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldHasSuffix(FieldQuery, v)) } // QueryEqualFold applies the EqualFold predicate on the "query" field. func QueryEqualFold(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEqualFold(FieldQuery, v)) } // QueryContainsFold applies the ContainsFold predicate on the "query" field. func QueryContainsFold(v string) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldContainsFold(FieldQuery, v)) } // CreatedEQ applies the EQ predicate on the "created" field. func CreatedEQ(v time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldCreated, v)) } // CreatedNEQ applies the NEQ predicate on the "created" field. func CreatedNEQ(v time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNEQ(FieldCreated, v)) } // CreatedIn applies the In predicate on the "created" field. func CreatedIn(vs ...time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldIn(FieldCreated, vs...)) } // CreatedNotIn applies the NotIn predicate on the "created" field. func CreatedNotIn(vs ...time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNotIn(FieldCreated, vs...)) } // CreatedGT applies the GT predicate on the "created" field. func CreatedGT(v time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldGT(FieldCreated, v)) } // CreatedGTE applies the GTE predicate on the "created" field. func CreatedGTE(v time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldGTE(FieldCreated, v)) } // CreatedLT applies the LT predicate on the "created" field. func CreatedLT(v time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldLT(FieldCreated, v)) } // CreatedLTE applies the LTE predicate on the "created" field. func CreatedLTE(v time.Time) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldLTE(FieldCreated, v)) } // OwnerEQ applies the EQ predicate on the "owner" field. func OwnerEQ(v uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldEQ(FieldOwner, v)) } // OwnerNEQ applies the NEQ predicate on the "owner" field. func OwnerNEQ(v uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNEQ(FieldOwner, v)) } // OwnerIn applies the In predicate on the "owner" field. func OwnerIn(vs ...uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldIn(FieldOwner, vs...)) } // OwnerNotIn applies the NotIn predicate on the "owner" field. func OwnerNotIn(vs ...uuid.UUID) predicate.SearchQuery { return predicate.SearchQuery(sql.FieldNotIn(FieldOwner, vs...)) } // HasUser applies the HasEdge predicate on the "user" edge. func HasUser() predicate.SearchQuery { return predicate.SearchQuery(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates). func HasUserWith(preds ...predicate.User) predicate.SearchQuery { return predicate.SearchQuery(func(s *sql.Selector) { step := newUserStep() 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.SearchQuery) predicate.SearchQuery { return predicate.SearchQuery(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.SearchQuery) predicate.SearchQuery { return predicate.SearchQuery(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.SearchQuery) predicate.SearchQuery { return predicate.SearchQuery(func(s *sql.Selector) { p(s.Not()) }) }