mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
schema/field: add GoType option for string fields (#500)
This commit is contained in:
@@ -122,10 +122,11 @@ func NameIn(vs ...string) predicate.City {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.City(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func NameNotIn(vs ...string) predicate.City {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.City(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func NameIn(vs ...string) predicate.Street {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Street(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func NameNotIn(vs ...string) predicate.Street {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Street(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func NameIn(vs ...string) predicate.Group {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Group(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func NameNotIn(vs ...string) predicate.Group {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Group(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func NameIn(vs ...string) predicate.Pet {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Pet(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func NameNotIn(vs ...string) predicate.Pet {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Pet(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func ValueIn(vs ...int) predicate.Node {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Node(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func ValueNotIn(vs ...int) predicate.Node {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Node(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -131,10 +131,11 @@ func ExpiredIn(vs ...time.Time) predicate.Card {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Card(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -148,10 +149,11 @@ func ExpiredNotIn(vs ...time.Time) predicate.Card {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Card(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -207,10 +209,11 @@ func NumberIn(vs ...string) predicate.Card {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Card(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -224,10 +227,11 @@ func NumberNotIn(vs ...string) predicate.Card {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Card(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func ValueIn(vs ...int) predicate.Node {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Node(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func ValueNotIn(vs ...int) predicate.Node {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Node(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -131,10 +131,11 @@ func ModelIn(vs ...string) predicate.Car {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Car(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -148,10 +149,11 @@ func ModelNotIn(vs ...string) predicate.Car {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Car(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -242,10 +244,11 @@ func RegisteredAtIn(vs ...time.Time) predicate.Car {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Car(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -259,10 +262,11 @@ func RegisteredAtNotIn(vs ...time.Time) predicate.Car {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Car(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func NameIn(vs ...string) predicate.Group {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Group(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func NameNotIn(vs ...string) predicate.Group {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Group(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func NameIn(vs ...string) predicate.Group {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Group(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func NameNotIn(vs ...string) predicate.Group {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Group(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -122,10 +122,11 @@ func NameIn(vs ...string) predicate.Pet {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Pet(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -139,10 +140,11 @@ func NameNotIn(vs ...string) predicate.Pet {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.Pet(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -129,10 +129,11 @@ func AgeIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -146,10 +147,11 @@ func AgeNotIn(vs ...int) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -205,10 +207,11 @@ func NameIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
@@ -222,10 +225,11 @@ func NameNotIn(vs ...string) predicate.User {
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
||||
return predicate.User(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(vs) == 0 {
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user