Skip to content

Commit

Permalink
feat: add NotIn for Field
Browse files Browse the repository at this point in the history
  • Loading branch information
qqxhb committed Jun 17, 2024
1 parent 536bc26 commit 0756fc8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions field/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ func (field Field) In(values ...driver.Valuer) Expr {
return expr{e: clause.IN{Column: field.RawExpr(), Values: field.toSlice(values...)}}
}

// NotIn ...
func (field Field) NotIn(values ...driver.Valuer) Expr {
return expr{e: clause.Not(field.In(values...).expression())}
}

// Gt ...
func (field Field) Gt(value driver.Valuer) Expr {
return expr{e: clause.Gt{Column: field.RawExpr(), Value: value}}
Expand Down

0 comments on commit 0756fc8

Please sign in to comment.