mirror of
https://github.com/NixOS/nix
synced 2025-06-30 07:33:16 +02:00
Remove Store::queryDerivationOutputNames()
This function was used in only one place, where it could easily be replaced by readDerivation() since it's not performance-critical. (This function appears to have been modelled after queryDerivationOutputs(), which exists only to make the garbage collector faster.)
This commit is contained in:
parent
4a4c063222
commit
045b07200c
11 changed files with 14 additions and 41 deletions
|
@ -785,23 +785,6 @@ StorePathSet LocalStore::queryDerivationOutputs(const StorePath & path)
|
|||
}
|
||||
|
||||
|
||||
StringSet LocalStore::queryDerivationOutputNames(const StorePath & path)
|
||||
{
|
||||
return retrySQLite<StringSet>([&]() {
|
||||
auto state(_state.lock());
|
||||
|
||||
auto useQueryDerivationOutputs(state->stmtQueryDerivationOutputs.use()
|
||||
(queryValidPathId(*state, path)));
|
||||
|
||||
StringSet outputNames;
|
||||
while (useQueryDerivationOutputs.next())
|
||||
outputNames.insert(useQueryDerivationOutputs.getStr(0));
|
||||
|
||||
return outputNames;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
std::optional<StorePath> LocalStore::queryPathFromHashPart(const std::string & hashPart)
|
||||
{
|
||||
if (hashPart.size() != storePathHashLen) throw Error("invalid hash part");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue