diff --git a/field/field.go b/field/field.go index 023b335c..1fc42d65 100644 --- a/field/field.go +++ b/field/field.go @@ -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}}