729 lines
22 KiB
Go
729 lines
22 KiB
Go
// Code generated by entc, DO NOT EDIT.
|
|
|
|
package obcluster
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"github.com/oceanbase/configserver/ent/predicate"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(ids) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
v := make([]interface{}, len(ids))
|
|
for i := range v {
|
|
v[i] = ids[i]
|
|
}
|
|
s.Where(sql.In(s.C(FieldID), v...))
|
|
})
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(ids) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
v := make([]interface{}, len(ids))
|
|
for i := range v {
|
|
v[i] = ids[i]
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldID), v...))
|
|
})
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id int) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
|
|
func CreateTime(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldCreateTime), v))
|
|
})
|
|
}
|
|
|
|
// UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
|
|
func UpdateTime(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldUpdateTime), v))
|
|
})
|
|
}
|
|
|
|
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
|
func Name(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// ObClusterID applies equality check predicate on the "ob_cluster_id" field. It's identical to ObClusterIDEQ.
|
|
func ObClusterID(v int64) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldObClusterID), v))
|
|
})
|
|
}
|
|
|
|
// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
|
|
func Type(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSON applies equality check predicate on the "rootservice_json" field. It's identical to RootserviceJSONEQ.
|
|
func RootserviceJSON(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// CreateTimeEQ applies the EQ predicate on the "create_time" field.
|
|
func CreateTimeEQ(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldCreateTime), v))
|
|
})
|
|
}
|
|
|
|
// CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
|
|
func CreateTimeNEQ(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldCreateTime), v))
|
|
})
|
|
}
|
|
|
|
// CreateTimeIn applies the In predicate on the "create_time" field.
|
|
func CreateTimeIn(vs ...time.Time) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.In(s.C(FieldCreateTime), v...))
|
|
})
|
|
}
|
|
|
|
// CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
|
|
func CreateTimeNotIn(vs ...time.Time) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldCreateTime), v...))
|
|
})
|
|
}
|
|
|
|
// CreateTimeGT applies the GT predicate on the "create_time" field.
|
|
func CreateTimeGT(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldCreateTime), v))
|
|
})
|
|
}
|
|
|
|
// CreateTimeGTE applies the GTE predicate on the "create_time" field.
|
|
func CreateTimeGTE(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldCreateTime), v))
|
|
})
|
|
}
|
|
|
|
// CreateTimeLT applies the LT predicate on the "create_time" field.
|
|
func CreateTimeLT(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldCreateTime), v))
|
|
})
|
|
}
|
|
|
|
// CreateTimeLTE applies the LTE predicate on the "create_time" field.
|
|
func CreateTimeLTE(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldCreateTime), v))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeEQ applies the EQ predicate on the "update_time" field.
|
|
func UpdateTimeEQ(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldUpdateTime), v))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
|
|
func UpdateTimeNEQ(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldUpdateTime), v))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeIn applies the In predicate on the "update_time" field.
|
|
func UpdateTimeIn(vs ...time.Time) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.In(s.C(FieldUpdateTime), v...))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.
|
|
func UpdateTimeNotIn(vs ...time.Time) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldUpdateTime), v...))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeGT applies the GT predicate on the "update_time" field.
|
|
func UpdateTimeGT(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldUpdateTime), v))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeGTE applies the GTE predicate on the "update_time" field.
|
|
func UpdateTimeGTE(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldUpdateTime), v))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeLT applies the LT predicate on the "update_time" field.
|
|
func UpdateTimeLT(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldUpdateTime), v))
|
|
})
|
|
}
|
|
|
|
// UpdateTimeLTE applies the LTE predicate on the "update_time" field.
|
|
func UpdateTimeLTE(v time.Time) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldUpdateTime), v))
|
|
})
|
|
}
|
|
|
|
// NameEQ applies the EQ predicate on the "name" field.
|
|
func NameEQ(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameNEQ applies the NEQ predicate on the "name" field.
|
|
func NameNEQ(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameIn applies the In predicate on the "name" field.
|
|
func NameIn(vs ...string) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.In(s.C(FieldName), v...))
|
|
})
|
|
}
|
|
|
|
// NameNotIn applies the NotIn predicate on the "name" field.
|
|
func NameNotIn(vs ...string) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldName), v...))
|
|
})
|
|
}
|
|
|
|
// NameGT applies the GT predicate on the "name" field.
|
|
func NameGT(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameGTE applies the GTE predicate on the "name" field.
|
|
func NameGTE(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameLT applies the LT predicate on the "name" field.
|
|
func NameLT(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameLTE applies the LTE predicate on the "name" field.
|
|
func NameLTE(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameContains applies the Contains predicate on the "name" field.
|
|
func NameContains(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
|
func NameHasPrefix(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
|
func NameHasSuffix(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
|
func NameEqualFold(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
|
func NameContainsFold(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldName), v))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDEQ applies the EQ predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDEQ(v int64) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldObClusterID), v))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDNEQ applies the NEQ predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDNEQ(v int64) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldObClusterID), v))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDIn applies the In predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDIn(vs ...int64) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.In(s.C(FieldObClusterID), v...))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDNotIn applies the NotIn predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDNotIn(vs ...int64) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldObClusterID), v...))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDGT applies the GT predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDGT(v int64) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldObClusterID), v))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDGTE applies the GTE predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDGTE(v int64) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldObClusterID), v))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDLT applies the LT predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDLT(v int64) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldObClusterID), v))
|
|
})
|
|
}
|
|
|
|
// ObClusterIDLTE applies the LTE predicate on the "ob_cluster_id" field.
|
|
func ObClusterIDLTE(v int64) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldObClusterID), v))
|
|
})
|
|
}
|
|
|
|
// TypeEQ applies the EQ predicate on the "type" field.
|
|
func TypeEQ(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeNEQ applies the NEQ predicate on the "type" field.
|
|
func TypeNEQ(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeIn applies the In predicate on the "type" field.
|
|
func TypeIn(vs ...string) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.In(s.C(FieldType), v...))
|
|
})
|
|
}
|
|
|
|
// TypeNotIn applies the NotIn predicate on the "type" field.
|
|
func TypeNotIn(vs ...string) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldType), v...))
|
|
})
|
|
}
|
|
|
|
// TypeGT applies the GT predicate on the "type" field.
|
|
func TypeGT(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeGTE applies the GTE predicate on the "type" field.
|
|
func TypeGTE(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeLT applies the LT predicate on the "type" field.
|
|
func TypeLT(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeLTE applies the LTE predicate on the "type" field.
|
|
func TypeLTE(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeContains applies the Contains predicate on the "type" field.
|
|
func TypeContains(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeHasPrefix applies the HasPrefix predicate on the "type" field.
|
|
func TypeHasPrefix(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeHasSuffix applies the HasSuffix predicate on the "type" field.
|
|
func TypeHasSuffix(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeEqualFold applies the EqualFold predicate on the "type" field.
|
|
func TypeEqualFold(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeContainsFold applies the ContainsFold predicate on the "type" field.
|
|
func TypeContainsFold(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONEQ applies the EQ predicate on the "rootservice_json" field.
|
|
func RootserviceJSONEQ(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONNEQ applies the NEQ predicate on the "rootservice_json" field.
|
|
func RootserviceJSONNEQ(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONIn applies the In predicate on the "rootservice_json" field.
|
|
func RootserviceJSONIn(vs ...string) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.In(s.C(FieldRootserviceJSON), v...))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONNotIn applies the NotIn predicate on the "rootservice_json" field.
|
|
func RootserviceJSONNotIn(vs ...string) predicate.ObCluster {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
// if not arguments were provided, append the FALSE constants,
|
|
// since we can't apply "IN ()". This will make this predicate falsy.
|
|
if len(v) == 0 {
|
|
s.Where(sql.False())
|
|
return
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldRootserviceJSON), v...))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONGT applies the GT predicate on the "rootservice_json" field.
|
|
func RootserviceJSONGT(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONGTE applies the GTE predicate on the "rootservice_json" field.
|
|
func RootserviceJSONGTE(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONLT applies the LT predicate on the "rootservice_json" field.
|
|
func RootserviceJSONLT(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONLTE applies the LTE predicate on the "rootservice_json" field.
|
|
func RootserviceJSONLTE(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONContains applies the Contains predicate on the "rootservice_json" field.
|
|
func RootserviceJSONContains(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONHasPrefix applies the HasPrefix predicate on the "rootservice_json" field.
|
|
func RootserviceJSONHasPrefix(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONHasSuffix applies the HasSuffix predicate on the "rootservice_json" field.
|
|
func RootserviceJSONHasSuffix(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONEqualFold applies the EqualFold predicate on the "rootservice_json" field.
|
|
func RootserviceJSONEqualFold(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// RootserviceJSONContainsFold applies the ContainsFold predicate on the "rootservice_json" field.
|
|
func RootserviceJSONContainsFold(v string) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldRootserviceJSON), v))
|
|
})
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.ObCluster) predicate.ObCluster {
|
|
return predicate.ObCluster(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.ObCluster) predicate.ObCluster {
|
|
return predicate.ObCluster(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.ObCluster) predicate.ObCluster {
|
|
return predicate.ObCluster(func(s *sql.Selector) {
|
|
p(s.Not())
|
|
})
|
|
}
|