1
0

add handle

This commit is contained in:
2023-06-21 10:17:52 +09:00
parent 9d1f0f73c1
commit e9516ac4cd
18 changed files with 663 additions and 176 deletions

View File

@ -70,6 +70,11 @@ func Delete(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldDelete, v))
}
// Handle applies equality check predicate on the "handle" field. It's identical to HandleEQ.
func Handle(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldHandle, v))
}
// Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
func Token(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldToken, v))
@ -330,6 +335,26 @@ func DeleteNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldDelete))
}
// HandleEQ applies the EQ predicate on the "handle" field.
func HandleEQ(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldHandle, v))
}
// HandleNEQ applies the NEQ predicate on the "handle" field.
func HandleNEQ(v bool) predicate.User {
return predicate.User(sql.FieldNEQ(FieldHandle, v))
}
// HandleIsNil applies the IsNil predicate on the "handle" field.
func HandleIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldHandle))
}
// HandleNotNil applies the NotNil predicate on the "handle" field.
func HandleNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldHandle))
}
// TokenEQ applies the EQ predicate on the "token" field.
func TokenEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldToken, v))