+3
-2
appview/db/db.go
+3
-2
appview/db/db.go
···
653
653
// if we have `FilterIn(k, [1, 2, 3])`, compile it down to `k in (?, ?, ?)`
654
654
if kind == reflect.Slice || kind == reflect.Array {
655
655
if rv.Len() == 0 {
656
-
panic(fmt.Sprintf("empty slice passed to %q filter on %s", f.cmp, f.key))
656
+
// always false
657
+
return "1 = 0"
657
658
}
658
659
659
660
placeholders := make([]string, rv.Len())
···
672
673
kind := rv.Kind()
673
674
if kind == reflect.Slice || kind == reflect.Array {
674
675
if rv.Len() == 0 {
675
-
panic(fmt.Sprintf("empty slice passed to %q filter on %s", f.cmp, f.key))
676
+
return nil
676
677
}
677
678
678
679
out := make([]any, rv.Len())