aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-08-13 15:48:25 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2021-08-13 17:23:50 +0300
commit97f312a1b536c92440b04ec3dd743fc2802ab150 (patch)
treec232649f6bfb1f566032ad5c5e6e185b3df7d100 /bpkg/package.hxx
parentd1fa0047be1db658b165514dc429ce494517b39c (diff)
Optimize query_dependents() using prepared queries
Diffstat (limited to 'bpkg/package.hxx')
-rw-r--r--bpkg/package.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/bpkg/package.hxx b/bpkg/package.hxx
index a0e809a..1a62cd9 100644
--- a/bpkg/package.hxx
+++ b/bpkg/package.hxx
@@ -1314,6 +1314,12 @@ namespace bpkg
const package_name& dependency,
database& dependency_db);
+ // As above but cache the result in a vector. This version should be used if
+ // query_dependents*() may be called recursively.
+ //
+ vector<package_dependent>
+ query_dependents_cache (database&, const package_name&, database&);
+
// Database and package name pair.
//
// It is normally used as a key for maps containing data for packages across