dependencies api: Implement `Dependents`
Created by: efritz
After #35435 (closed) is implemented, we can write a Dependents
method that...
- queries data from
codeintel_lockfiles
/codeintel_lockfile_references
(see query below) - queries data from
lsif_packages
/lsif_references
...and merges the two results together.
The query that will need to be written to get inverse lockfile data will be something like (shorthanded SQL):
select repository_id, commit_bytea
from codeintel_lockfiles
where codeintel_lockfile_reference_ids @> (
select array_agg(id) -- or some other crazy incantation
from codeintel_lockfile_references
where repository_id = %s and commit_bytea = %s
)
The query needed for precise code intel is described in this comment.