|
@@ -1,4 +1,4 @@
|
|
-// Code generated by entc, DO NOT EDIT.
|
|
|
|
|
|
+// Code generated by ent, DO NOT EDIT.
|
|
|
|
|
|
package alert
|
|
package alert
|
|
|
|
|
|
@@ -34,13 +34,7 @@ func IDNEQ(id int) predicate.Alert {
|
|
// IDIn applies the In predicate on the ID field.
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...int) predicate.Alert {
|
|
func IDIn(ids ...int) predicate.Alert {
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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))
|
|
|
|
|
|
+ v := make([]any, len(ids))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = ids[i]
|
|
v[i] = ids[i]
|
|
}
|
|
}
|
|
@@ -51,13 +45,7 @@ func IDIn(ids ...int) predicate.Alert {
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...int) predicate.Alert {
|
|
func IDNotIn(ids ...int) predicate.Alert {
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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))
|
|
|
|
|
|
+ v := make([]any, len(ids))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = ids[i]
|
|
v[i] = ids[i]
|
|
}
|
|
}
|
|
@@ -263,34 +251,22 @@ func CreatedAtNEQ(v time.Time) predicate.Alert {
|
|
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.Alert {
|
|
func CreatedAtIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldCreatedAt), v...))
|
|
s.Where(sql.In(s.C(FieldCreatedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldCreatedAt), v...))
|
|
s.Where(sql.NotIn(s.C(FieldCreatedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -353,34 +329,22 @@ func UpdatedAtNEQ(v time.Time) predicate.Alert {
|
|
|
|
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
|
func UpdatedAtIn(vs ...time.Time) predicate.Alert {
|
|
func UpdatedAtIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldUpdatedAt), v...))
|
|
s.Where(sql.In(s.C(FieldUpdatedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldUpdatedAt), v...))
|
|
s.Where(sql.NotIn(s.C(FieldUpdatedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -443,34 +407,22 @@ func ScenarioNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// ScenarioIn applies the In predicate on the "scenario" field.
|
|
// ScenarioIn applies the In predicate on the "scenario" field.
|
|
func ScenarioIn(vs ...string) predicate.Alert {
|
|
func ScenarioIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldScenario), v...))
|
|
s.Where(sql.In(s.C(FieldScenario), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// ScenarioNotIn applies the NotIn predicate on the "scenario" field.
|
|
// ScenarioNotIn applies the NotIn predicate on the "scenario" field.
|
|
func ScenarioNotIn(vs ...string) predicate.Alert {
|
|
func ScenarioNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldScenario), v...))
|
|
s.Where(sql.NotIn(s.C(FieldScenario), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -554,34 +506,22 @@ func BucketIdNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// BucketIdIn applies the In predicate on the "bucketId" field.
|
|
// BucketIdIn applies the In predicate on the "bucketId" field.
|
|
func BucketIdIn(vs ...string) predicate.Alert {
|
|
func BucketIdIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldBucketId), v...))
|
|
s.Where(sql.In(s.C(FieldBucketId), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// BucketIdNotIn applies the NotIn predicate on the "bucketId" field.
|
|
// BucketIdNotIn applies the NotIn predicate on the "bucketId" field.
|
|
func BucketIdNotIn(vs ...string) predicate.Alert {
|
|
func BucketIdNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldBucketId), v...))
|
|
s.Where(sql.NotIn(s.C(FieldBucketId), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -679,34 +619,22 @@ func MessageNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// MessageIn applies the In predicate on the "message" field.
|
|
// MessageIn applies the In predicate on the "message" field.
|
|
func MessageIn(vs ...string) predicate.Alert {
|
|
func MessageIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldMessage), v...))
|
|
s.Where(sql.In(s.C(FieldMessage), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// MessageNotIn applies the NotIn predicate on the "message" field.
|
|
// MessageNotIn applies the NotIn predicate on the "message" field.
|
|
func MessageNotIn(vs ...string) predicate.Alert {
|
|
func MessageNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldMessage), v...))
|
|
s.Where(sql.NotIn(s.C(FieldMessage), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -804,34 +732,22 @@ func EventsCountNEQ(v int32) predicate.Alert {
|
|
|
|
|
|
// EventsCountIn applies the In predicate on the "eventsCount" field.
|
|
// EventsCountIn applies the In predicate on the "eventsCount" field.
|
|
func EventsCountIn(vs ...int32) predicate.Alert {
|
|
func EventsCountIn(vs ...int32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldEventsCount), v...))
|
|
s.Where(sql.In(s.C(FieldEventsCount), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// EventsCountNotIn applies the NotIn predicate on the "eventsCount" field.
|
|
// EventsCountNotIn applies the NotIn predicate on the "eventsCount" field.
|
|
func EventsCountNotIn(vs ...int32) predicate.Alert {
|
|
func EventsCountNotIn(vs ...int32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldEventsCount), v...))
|
|
s.Where(sql.NotIn(s.C(FieldEventsCount), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -894,34 +810,22 @@ func StartedAtNEQ(v time.Time) predicate.Alert {
|
|
|
|
|
|
// StartedAtIn applies the In predicate on the "startedAt" field.
|
|
// StartedAtIn applies the In predicate on the "startedAt" field.
|
|
func StartedAtIn(vs ...time.Time) predicate.Alert {
|
|
func StartedAtIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldStartedAt), v...))
|
|
s.Where(sql.In(s.C(FieldStartedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// StartedAtNotIn applies the NotIn predicate on the "startedAt" field.
|
|
// StartedAtNotIn applies the NotIn predicate on the "startedAt" field.
|
|
func StartedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
func StartedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldStartedAt), v...))
|
|
s.Where(sql.NotIn(s.C(FieldStartedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -984,34 +888,22 @@ func StoppedAtNEQ(v time.Time) predicate.Alert {
|
|
|
|
|
|
// StoppedAtIn applies the In predicate on the "stoppedAt" field.
|
|
// StoppedAtIn applies the In predicate on the "stoppedAt" field.
|
|
func StoppedAtIn(vs ...time.Time) predicate.Alert {
|
|
func StoppedAtIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldStoppedAt), v...))
|
|
s.Where(sql.In(s.C(FieldStoppedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// StoppedAtNotIn applies the NotIn predicate on the "stoppedAt" field.
|
|
// StoppedAtNotIn applies the NotIn predicate on the "stoppedAt" field.
|
|
func StoppedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
func StoppedAtNotIn(vs ...time.Time) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldStoppedAt), v...))
|
|
s.Where(sql.NotIn(s.C(FieldStoppedAt), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1074,34 +966,22 @@ func SourceIpNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// SourceIpIn applies the In predicate on the "sourceIp" field.
|
|
// SourceIpIn applies the In predicate on the "sourceIp" field.
|
|
func SourceIpIn(vs ...string) predicate.Alert {
|
|
func SourceIpIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceIp), v...))
|
|
s.Where(sql.In(s.C(FieldSourceIp), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceIpNotIn applies the NotIn predicate on the "sourceIp" field.
|
|
// SourceIpNotIn applies the NotIn predicate on the "sourceIp" field.
|
|
func SourceIpNotIn(vs ...string) predicate.Alert {
|
|
func SourceIpNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceIp), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceIp), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1199,34 +1079,22 @@ func SourceRangeNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// SourceRangeIn applies the In predicate on the "sourceRange" field.
|
|
// SourceRangeIn applies the In predicate on the "sourceRange" field.
|
|
func SourceRangeIn(vs ...string) predicate.Alert {
|
|
func SourceRangeIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceRange), v...))
|
|
s.Where(sql.In(s.C(FieldSourceRange), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceRangeNotIn applies the NotIn predicate on the "sourceRange" field.
|
|
// SourceRangeNotIn applies the NotIn predicate on the "sourceRange" field.
|
|
func SourceRangeNotIn(vs ...string) predicate.Alert {
|
|
func SourceRangeNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceRange), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceRange), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1324,34 +1192,22 @@ func SourceAsNumberNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// SourceAsNumberIn applies the In predicate on the "sourceAsNumber" field.
|
|
// SourceAsNumberIn applies the In predicate on the "sourceAsNumber" field.
|
|
func SourceAsNumberIn(vs ...string) predicate.Alert {
|
|
func SourceAsNumberIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceAsNumber), v...))
|
|
s.Where(sql.In(s.C(FieldSourceAsNumber), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceAsNumberNotIn applies the NotIn predicate on the "sourceAsNumber" field.
|
|
// SourceAsNumberNotIn applies the NotIn predicate on the "sourceAsNumber" field.
|
|
func SourceAsNumberNotIn(vs ...string) predicate.Alert {
|
|
func SourceAsNumberNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceAsNumber), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceAsNumber), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1449,34 +1305,22 @@ func SourceAsNameNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// SourceAsNameIn applies the In predicate on the "sourceAsName" field.
|
|
// SourceAsNameIn applies the In predicate on the "sourceAsName" field.
|
|
func SourceAsNameIn(vs ...string) predicate.Alert {
|
|
func SourceAsNameIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceAsName), v...))
|
|
s.Where(sql.In(s.C(FieldSourceAsName), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceAsNameNotIn applies the NotIn predicate on the "sourceAsName" field.
|
|
// SourceAsNameNotIn applies the NotIn predicate on the "sourceAsName" field.
|
|
func SourceAsNameNotIn(vs ...string) predicate.Alert {
|
|
func SourceAsNameNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceAsName), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceAsName), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1574,34 +1418,22 @@ func SourceCountryNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// SourceCountryIn applies the In predicate on the "sourceCountry" field.
|
|
// SourceCountryIn applies the In predicate on the "sourceCountry" field.
|
|
func SourceCountryIn(vs ...string) predicate.Alert {
|
|
func SourceCountryIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceCountry), v...))
|
|
s.Where(sql.In(s.C(FieldSourceCountry), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceCountryNotIn applies the NotIn predicate on the "sourceCountry" field.
|
|
// SourceCountryNotIn applies the NotIn predicate on the "sourceCountry" field.
|
|
func SourceCountryNotIn(vs ...string) predicate.Alert {
|
|
func SourceCountryNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceCountry), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceCountry), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1699,34 +1531,22 @@ func SourceLatitudeNEQ(v float32) predicate.Alert {
|
|
|
|
|
|
// SourceLatitudeIn applies the In predicate on the "sourceLatitude" field.
|
|
// SourceLatitudeIn applies the In predicate on the "sourceLatitude" field.
|
|
func SourceLatitudeIn(vs ...float32) predicate.Alert {
|
|
func SourceLatitudeIn(vs ...float32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceLatitude), v...))
|
|
s.Where(sql.In(s.C(FieldSourceLatitude), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceLatitudeNotIn applies the NotIn predicate on the "sourceLatitude" field.
|
|
// SourceLatitudeNotIn applies the NotIn predicate on the "sourceLatitude" field.
|
|
func SourceLatitudeNotIn(vs ...float32) predicate.Alert {
|
|
func SourceLatitudeNotIn(vs ...float32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceLatitude), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceLatitude), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1789,34 +1609,22 @@ func SourceLongitudeNEQ(v float32) predicate.Alert {
|
|
|
|
|
|
// SourceLongitudeIn applies the In predicate on the "sourceLongitude" field.
|
|
// SourceLongitudeIn applies the In predicate on the "sourceLongitude" field.
|
|
func SourceLongitudeIn(vs ...float32) predicate.Alert {
|
|
func SourceLongitudeIn(vs ...float32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceLongitude), v...))
|
|
s.Where(sql.In(s.C(FieldSourceLongitude), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceLongitudeNotIn applies the NotIn predicate on the "sourceLongitude" field.
|
|
// SourceLongitudeNotIn applies the NotIn predicate on the "sourceLongitude" field.
|
|
func SourceLongitudeNotIn(vs ...float32) predicate.Alert {
|
|
func SourceLongitudeNotIn(vs ...float32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceLongitude), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceLongitude), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -1879,34 +1687,22 @@ func SourceScopeNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// SourceScopeIn applies the In predicate on the "sourceScope" field.
|
|
// SourceScopeIn applies the In predicate on the "sourceScope" field.
|
|
func SourceScopeIn(vs ...string) predicate.Alert {
|
|
func SourceScopeIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceScope), v...))
|
|
s.Where(sql.In(s.C(FieldSourceScope), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceScopeNotIn applies the NotIn predicate on the "sourceScope" field.
|
|
// SourceScopeNotIn applies the NotIn predicate on the "sourceScope" field.
|
|
func SourceScopeNotIn(vs ...string) predicate.Alert {
|
|
func SourceScopeNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceScope), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceScope), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -2004,34 +1800,22 @@ func SourceValueNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// SourceValueIn applies the In predicate on the "sourceValue" field.
|
|
// SourceValueIn applies the In predicate on the "sourceValue" field.
|
|
func SourceValueIn(vs ...string) predicate.Alert {
|
|
func SourceValueIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceValue), v...))
|
|
s.Where(sql.In(s.C(FieldSourceValue), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// SourceValueNotIn applies the NotIn predicate on the "sourceValue" field.
|
|
// SourceValueNotIn applies the NotIn predicate on the "sourceValue" field.
|
|
func SourceValueNotIn(vs ...string) predicate.Alert {
|
|
func SourceValueNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldSourceValue), v...))
|
|
s.Where(sql.NotIn(s.C(FieldSourceValue), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -2129,34 +1913,22 @@ func CapacityNEQ(v int32) predicate.Alert {
|
|
|
|
|
|
// CapacityIn applies the In predicate on the "capacity" field.
|
|
// CapacityIn applies the In predicate on the "capacity" field.
|
|
func CapacityIn(vs ...int32) predicate.Alert {
|
|
func CapacityIn(vs ...int32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldCapacity), v...))
|
|
s.Where(sql.In(s.C(FieldCapacity), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// CapacityNotIn applies the NotIn predicate on the "capacity" field.
|
|
// CapacityNotIn applies the NotIn predicate on the "capacity" field.
|
|
func CapacityNotIn(vs ...int32) predicate.Alert {
|
|
func CapacityNotIn(vs ...int32) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldCapacity), v...))
|
|
s.Where(sql.NotIn(s.C(FieldCapacity), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -2219,34 +1991,22 @@ func LeakSpeedNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// LeakSpeedIn applies the In predicate on the "leakSpeed" field.
|
|
// LeakSpeedIn applies the In predicate on the "leakSpeed" field.
|
|
func LeakSpeedIn(vs ...string) predicate.Alert {
|
|
func LeakSpeedIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldLeakSpeed), v...))
|
|
s.Where(sql.In(s.C(FieldLeakSpeed), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// LeakSpeedNotIn applies the NotIn predicate on the "leakSpeed" field.
|
|
// LeakSpeedNotIn applies the NotIn predicate on the "leakSpeed" field.
|
|
func LeakSpeedNotIn(vs ...string) predicate.Alert {
|
|
func LeakSpeedNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldLeakSpeed), v...))
|
|
s.Where(sql.NotIn(s.C(FieldLeakSpeed), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -2344,34 +2104,22 @@ func ScenarioVersionNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// ScenarioVersionIn applies the In predicate on the "scenarioVersion" field.
|
|
// ScenarioVersionIn applies the In predicate on the "scenarioVersion" field.
|
|
func ScenarioVersionIn(vs ...string) predicate.Alert {
|
|
func ScenarioVersionIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldScenarioVersion), v...))
|
|
s.Where(sql.In(s.C(FieldScenarioVersion), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// ScenarioVersionNotIn applies the NotIn predicate on the "scenarioVersion" field.
|
|
// ScenarioVersionNotIn applies the NotIn predicate on the "scenarioVersion" field.
|
|
func ScenarioVersionNotIn(vs ...string) predicate.Alert {
|
|
func ScenarioVersionNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldScenarioVersion), v...))
|
|
s.Where(sql.NotIn(s.C(FieldScenarioVersion), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -2469,34 +2217,22 @@ func ScenarioHashNEQ(v string) predicate.Alert {
|
|
|
|
|
|
// ScenarioHashIn applies the In predicate on the "scenarioHash" field.
|
|
// ScenarioHashIn applies the In predicate on the "scenarioHash" field.
|
|
func ScenarioHashIn(vs ...string) predicate.Alert {
|
|
func ScenarioHashIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldScenarioHash), v...))
|
|
s.Where(sql.In(s.C(FieldScenarioHash), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
// ScenarioHashNotIn applies the NotIn predicate on the "scenarioHash" field.
|
|
// ScenarioHashNotIn applies the NotIn predicate on the "scenarioHash" field.
|
|
func ScenarioHashNotIn(vs ...string) predicate.Alert {
|
|
func ScenarioHashNotIn(vs ...string) predicate.Alert {
|
|
- v := make([]interface{}, len(vs))
|
|
|
|
|
|
+ v := make([]any, len(vs))
|
|
for i := range v {
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
v[i] = vs[i]
|
|
}
|
|
}
|
|
return predicate.Alert(func(s *sql.Selector) {
|
|
return predicate.Alert(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(FieldScenarioHash), v...))
|
|
s.Where(sql.NotIn(s.C(FieldScenarioHash), v...))
|
|
})
|
|
})
|
|
}
|
|
}
|