Don’t include empty/deleted values from KV storage
When looping over a range of KV items, it should ignore items which have been set to NULL and whose latest version has therefore been deleted.
This commit is contained in:
parent
49ec33987f
commit
55ece805e4
1 changed files with 3 additions and 1 deletions
|
@ -114,7 +114,9 @@ func many(res *sql.Rows, err error) ([]kvs.KV, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, &kvs.DBError{}
|
return nil, &kvs.DBError{}
|
||||||
}
|
}
|
||||||
out = append(out, kv)
|
if kv.val != nil {
|
||||||
|
out = append(out, kv)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = res.Err(); err != nil {
|
if err = res.Err(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue