fix jsonpath-based taq query.

This commit is contained in:
fiatjaf
2021-11-28 16:55:39 -03:00
parent 7a3e07c5b2
commit 5a797d2c65
4 changed files with 7 additions and 8 deletions

View File

@@ -29,4 +29,4 @@ CREATE UNIQUE INDEX IF NOT EXISTS pubkeytimeidx ON event (pubkey, created_at);
return db, nil
}
const relatedEventsCondition = `tags @@ '$[*][1] == "' || ? || '"'`
const tagConditions = `jsonb_path_match(tags, '$[*][1] == $value', jsonb_build_object('value', ?::text))`