mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc/predicate: add isnull/notnull predicates for codegen
Reviewed By: idoshveki Differential Revision: D16687226 fbshipit-source-id: 14a39e066447dbf77413e5c7f7318a2d61bddd32
This commit is contained in:
committed by
Facebook Github Bot
parent
23059c8bae
commit
25f5a2ef01
@@ -466,6 +466,24 @@ func AddressHasSuffix(v string) predicate.User {
|
||||
)
|
||||
}
|
||||
|
||||
// AddressIsNull applies the IsNull predicate on the "address" field.
|
||||
func AddressIsNull() predicate.User {
|
||||
return predicate.User(
|
||||
func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldAddress)))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
// AddressNotNull applies the NotNull predicate on the "address" field.
|
||||
func AddressNotNull() predicate.User {
|
||||
return predicate.User(
|
||||
func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldAddress)))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
// And groups list of predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.User) predicate.User {
|
||||
return predicate.User(
|
||||
|
||||
Reference in New Issue
Block a user