forked from tangled.org/core
Monorepo for Tangled

appview/db: fix comparing against []byte

SQLite stores byte sequences as blobs, which we were not handling properly,
causing (at least) actions relating to artifacts to break. (Not sure
when they broke, sorry!)

Signed-off-by: Winter <winter@winter.cafe>

authored by winter.bsky.social and committed by Tangled 64bc1297 10cd7fbb

Changed files
+2 -2
appview
db
+2 -2
appview/db/db.go
··· 728 728 kind := rv.Kind() 729 729 730 730 // if we have `FilterIn(k, [1, 2, 3])`, compile it down to `k in (?, ?, ?)` 731 - if kind == reflect.Slice || kind == reflect.Array { 731 + if (kind == reflect.Slice && rv.Type().Elem().Kind() != reflect.Uint8) || kind == reflect.Array { 732 732 if rv.Len() == 0 { 733 733 // always false 734 734 return "1 = 0" ··· 748 748 func (f filter) Arg() []any { 749 749 rv := reflect.ValueOf(f.arg) 750 750 kind := rv.Kind() 751 - if kind == reflect.Slice || kind == reflect.Array { 751 + if (kind == reflect.Slice && rv.Type().Elem().Kind() != reflect.Uint8) || kind == reflect.Array { 752 752 if rv.Len() == 0 { 753 753 return nil 754 754 }