Skip to content
This repository was archived by the owner on Dec 13, 2024. It is now read-only.

Commit 9dc5026

Browse files
author
thisisaaronland
committed
skip -1 (and lower) when gather relations to index
1 parent 76d18c6 commit 9dc5026

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

index.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,17 @@ func SQLiteFeaturesIndexRelationsFuncWithOptions(opts *SQLiteFeaturesIndexRelati
135135
}
136136

137137
for _, r := range rsp.Array() {
138+
138139
id := r.Int()
140+
141+
// skip -1, -4, etc.
142+
// (20201224/thisisaaronland)
143+
144+
if id <= 0 {
145+
continue
146+
}
147+
139148
relations[id] = true
140-
// log.Println("MATCH", path, id)
141149
}
142150
}
143151

0 commit comments

Comments
 (0)