Files

615 lines
23 KiB
Go

// Code generated by ent, DO NOT EDIT.
package taskmodelswitch
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/chaitin/MonkeyCode/backend/db/predicate"
"github.com/google/uuid"
)
// ID filters vertices based on their ID field.
func ID(id uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLTE(FieldID, id))
}
// TaskID applies equality check predicate on the "task_id" field. It's identical to TaskIDEQ.
func TaskID(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldTaskID, v))
}
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserID(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldUserID, v))
}
// FromModelID applies equality check predicate on the "from_model_id" field. It's identical to FromModelIDEQ.
func FromModelID(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldFromModelID, v))
}
// ToModelID applies equality check predicate on the "to_model_id" field. It's identical to ToModelIDEQ.
func ToModelID(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldToModelID, v))
}
// RequestID applies equality check predicate on the "request_id" field. It's identical to RequestIDEQ.
func RequestID(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldRequestID, v))
}
// LoadSession applies equality check predicate on the "load_session" field. It's identical to LoadSessionEQ.
func LoadSession(v bool) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldLoadSession, v))
}
// Success applies equality check predicate on the "success" field. It's identical to SuccessEQ.
func Success(v bool) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldSuccess, v))
}
// Message applies equality check predicate on the "message" field. It's identical to MessageEQ.
func Message(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldMessage, v))
}
// SessionID applies equality check predicate on the "session_id" field. It's identical to SessionIDEQ.
func SessionID(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldSessionID, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldUpdatedAt, v))
}
// TaskIDEQ applies the EQ predicate on the "task_id" field.
func TaskIDEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldTaskID, v))
}
// TaskIDNEQ applies the NEQ predicate on the "task_id" field.
func TaskIDNEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldTaskID, v))
}
// TaskIDIn applies the In predicate on the "task_id" field.
func TaskIDIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldTaskID, vs...))
}
// TaskIDNotIn applies the NotIn predicate on the "task_id" field.
func TaskIDNotIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldTaskID, vs...))
}
// UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldUserID, v))
}
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldUserID, v))
}
// UserIDIn applies the In predicate on the "user_id" field.
func UserIDIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldUserID, vs...))
}
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
func UserIDNotIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldUserID, vs...))
}
// FromModelIDEQ applies the EQ predicate on the "from_model_id" field.
func FromModelIDEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldFromModelID, v))
}
// FromModelIDNEQ applies the NEQ predicate on the "from_model_id" field.
func FromModelIDNEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldFromModelID, v))
}
// FromModelIDIn applies the In predicate on the "from_model_id" field.
func FromModelIDIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldFromModelID, vs...))
}
// FromModelIDNotIn applies the NotIn predicate on the "from_model_id" field.
func FromModelIDNotIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldFromModelID, vs...))
}
// FromModelIDIsNil applies the IsNil predicate on the "from_model_id" field.
func FromModelIDIsNil() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIsNull(FieldFromModelID))
}
// FromModelIDNotNil applies the NotNil predicate on the "from_model_id" field.
func FromModelIDNotNil() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotNull(FieldFromModelID))
}
// ToModelIDEQ applies the EQ predicate on the "to_model_id" field.
func ToModelIDEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldToModelID, v))
}
// ToModelIDNEQ applies the NEQ predicate on the "to_model_id" field.
func ToModelIDNEQ(v uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldToModelID, v))
}
// ToModelIDIn applies the In predicate on the "to_model_id" field.
func ToModelIDIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldToModelID, vs...))
}
// ToModelIDNotIn applies the NotIn predicate on the "to_model_id" field.
func ToModelIDNotIn(vs ...uuid.UUID) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldToModelID, vs...))
}
// RequestIDEQ applies the EQ predicate on the "request_id" field.
func RequestIDEQ(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldRequestID, v))
}
// RequestIDNEQ applies the NEQ predicate on the "request_id" field.
func RequestIDNEQ(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldRequestID, v))
}
// RequestIDIn applies the In predicate on the "request_id" field.
func RequestIDIn(vs ...string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldRequestID, vs...))
}
// RequestIDNotIn applies the NotIn predicate on the "request_id" field.
func RequestIDNotIn(vs ...string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldRequestID, vs...))
}
// RequestIDGT applies the GT predicate on the "request_id" field.
func RequestIDGT(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGT(FieldRequestID, v))
}
// RequestIDGTE applies the GTE predicate on the "request_id" field.
func RequestIDGTE(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGTE(FieldRequestID, v))
}
// RequestIDLT applies the LT predicate on the "request_id" field.
func RequestIDLT(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLT(FieldRequestID, v))
}
// RequestIDLTE applies the LTE predicate on the "request_id" field.
func RequestIDLTE(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLTE(FieldRequestID, v))
}
// RequestIDContains applies the Contains predicate on the "request_id" field.
func RequestIDContains(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldContains(FieldRequestID, v))
}
// RequestIDHasPrefix applies the HasPrefix predicate on the "request_id" field.
func RequestIDHasPrefix(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldHasPrefix(FieldRequestID, v))
}
// RequestIDHasSuffix applies the HasSuffix predicate on the "request_id" field.
func RequestIDHasSuffix(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldHasSuffix(FieldRequestID, v))
}
// RequestIDEqualFold applies the EqualFold predicate on the "request_id" field.
func RequestIDEqualFold(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEqualFold(FieldRequestID, v))
}
// RequestIDContainsFold applies the ContainsFold predicate on the "request_id" field.
func RequestIDContainsFold(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldContainsFold(FieldRequestID, v))
}
// LoadSessionEQ applies the EQ predicate on the "load_session" field.
func LoadSessionEQ(v bool) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldLoadSession, v))
}
// LoadSessionNEQ applies the NEQ predicate on the "load_session" field.
func LoadSessionNEQ(v bool) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldLoadSession, v))
}
// SuccessEQ applies the EQ predicate on the "success" field.
func SuccessEQ(v bool) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldSuccess, v))
}
// SuccessNEQ applies the NEQ predicate on the "success" field.
func SuccessNEQ(v bool) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldSuccess, v))
}
// SuccessIsNil applies the IsNil predicate on the "success" field.
func SuccessIsNil() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIsNull(FieldSuccess))
}
// SuccessNotNil applies the NotNil predicate on the "success" field.
func SuccessNotNil() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotNull(FieldSuccess))
}
// MessageEQ applies the EQ predicate on the "message" field.
func MessageEQ(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldMessage, v))
}
// MessageNEQ applies the NEQ predicate on the "message" field.
func MessageNEQ(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldMessage, v))
}
// MessageIn applies the In predicate on the "message" field.
func MessageIn(vs ...string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldMessage, vs...))
}
// MessageNotIn applies the NotIn predicate on the "message" field.
func MessageNotIn(vs ...string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldMessage, vs...))
}
// MessageGT applies the GT predicate on the "message" field.
func MessageGT(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGT(FieldMessage, v))
}
// MessageGTE applies the GTE predicate on the "message" field.
func MessageGTE(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGTE(FieldMessage, v))
}
// MessageLT applies the LT predicate on the "message" field.
func MessageLT(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLT(FieldMessage, v))
}
// MessageLTE applies the LTE predicate on the "message" field.
func MessageLTE(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLTE(FieldMessage, v))
}
// MessageContains applies the Contains predicate on the "message" field.
func MessageContains(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldContains(FieldMessage, v))
}
// MessageHasPrefix applies the HasPrefix predicate on the "message" field.
func MessageHasPrefix(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldHasPrefix(FieldMessage, v))
}
// MessageHasSuffix applies the HasSuffix predicate on the "message" field.
func MessageHasSuffix(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldHasSuffix(FieldMessage, v))
}
// MessageEqualFold applies the EqualFold predicate on the "message" field.
func MessageEqualFold(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEqualFold(FieldMessage, v))
}
// MessageContainsFold applies the ContainsFold predicate on the "message" field.
func MessageContainsFold(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldContainsFold(FieldMessage, v))
}
// SessionIDEQ applies the EQ predicate on the "session_id" field.
func SessionIDEQ(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldSessionID, v))
}
// SessionIDNEQ applies the NEQ predicate on the "session_id" field.
func SessionIDNEQ(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldSessionID, v))
}
// SessionIDIn applies the In predicate on the "session_id" field.
func SessionIDIn(vs ...string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldSessionID, vs...))
}
// SessionIDNotIn applies the NotIn predicate on the "session_id" field.
func SessionIDNotIn(vs ...string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldSessionID, vs...))
}
// SessionIDGT applies the GT predicate on the "session_id" field.
func SessionIDGT(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGT(FieldSessionID, v))
}
// SessionIDGTE applies the GTE predicate on the "session_id" field.
func SessionIDGTE(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGTE(FieldSessionID, v))
}
// SessionIDLT applies the LT predicate on the "session_id" field.
func SessionIDLT(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLT(FieldSessionID, v))
}
// SessionIDLTE applies the LTE predicate on the "session_id" field.
func SessionIDLTE(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLTE(FieldSessionID, v))
}
// SessionIDContains applies the Contains predicate on the "session_id" field.
func SessionIDContains(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldContains(FieldSessionID, v))
}
// SessionIDHasPrefix applies the HasPrefix predicate on the "session_id" field.
func SessionIDHasPrefix(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldHasPrefix(FieldSessionID, v))
}
// SessionIDHasSuffix applies the HasSuffix predicate on the "session_id" field.
func SessionIDHasSuffix(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldHasSuffix(FieldSessionID, v))
}
// SessionIDEqualFold applies the EqualFold predicate on the "session_id" field.
func SessionIDEqualFold(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEqualFold(FieldSessionID, v))
}
// SessionIDContainsFold applies the ContainsFold predicate on the "session_id" field.
func SessionIDContainsFold(v string) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldContainsFold(FieldSessionID, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.FieldLTE(FieldUpdatedAt, v))
}
// HasTask applies the HasEdge predicate on the "task" edge.
func HasTask() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, TaskTable, TaskColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasTaskWith applies the HasEdge predicate on the "task" edge with a given conditions (other predicates).
func HasTaskWith(preds ...predicate.Task) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(func(s *sql.Selector) {
step := newTaskStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasUser applies the HasEdge predicate on the "user" edge.
func HasUser() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(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.TaskModelSwitch {
return predicate.TaskModelSwitch(func(s *sql.Selector) {
step := newUserStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasFromModel applies the HasEdge predicate on the "from_model" edge.
func HasFromModel() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, FromModelTable, FromModelColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasFromModelWith applies the HasEdge predicate on the "from_model" edge with a given conditions (other predicates).
func HasFromModelWith(preds ...predicate.Model) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(func(s *sql.Selector) {
step := newFromModelStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasToModel applies the HasEdge predicate on the "to_model" edge.
func HasToModel() predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, ToModelTable, ToModelColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasToModelWith applies the HasEdge predicate on the "to_model" edge with a given conditions (other predicates).
func HasToModelWith(preds ...predicate.Model) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(func(s *sql.Selector) {
step := newToModelStep()
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.TaskModelSwitch) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.TaskModelSwitch) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.TaskModelSwitch) predicate.TaskModelSwitch {
return predicate.TaskModelSwitch(sql.NotPredicates(p))
}