|
@@ -49,6 +49,9 @@ func (s *List) Result(pg *gorm.DB, fields rest.FieldNamesList, res any) (count i
|
|
|
if cond.Operator != "" && cond.Operator != rest.OperatorNot {
|
|
|
err = rest.ErrorFiled(cond.Field, "Expected empty operator or not")
|
|
|
}
|
|
|
+ if cond.Operator == rest.OperatorExists {
|
|
|
+ cond.Operator = rest.OperatorEmpty
|
|
|
+ }
|
|
|
q := fmt.Sprintf("%s is %s null", CamelToSnake(cond.Field), cond.Operator)
|
|
|
if i == 0 || cond.Logic == rest.LogicAND {
|
|
|
pg = pg.Where(q)
|