aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-06-22 09:26:55 +0200
committerregnat <rg@regnat.ovh>2021-06-23 08:16:34 +0200
commit7c96a76dd7da69fa527dea7110d1156c1c5fbe9e (patch)
tree413703c68947b2e32e19bacd0f5dfff5f5498996 /src/libstore/local-store.cc
parent8d09a4f9a09473e6a32cc118ad10827ec5650700 (diff)
Reformat the sql statements
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 45bb5efc8..b56df735c 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -713,14 +713,18 @@ void LocalStore::registerDrvOutput(const Realisation & info)
settings.requireExperimentalFeature("ca-derivations");
retrySQLite<void>([&]() {
auto state(_state.lock());
- state->stmts->RegisterRealisedOutput
- .use()(info.id.strHash())(info.id.outputName)(printStorePath(
- info.outPath))(concatStringsSep(" ", info.signatures))
+ state->stmts->RegisterRealisedOutput.use()
+ (info.id.strHash())
+ (info.id.outputName)
+ (printStorePath(info.outPath))
+ (concatStringsSep(" ", info.signatures))
.exec();
uint64_t myId = state->db.getLastInsertedRowId();
for (auto & [outputId, _] : info.dependentRealisations) {
- state->stmts->AddRealisationReference
- .use()(myId)(outputId.strHash())(outputId.outputName)
+ state->stmts->AddRealisationReference.use()
+ (myId)
+ (outputId.strHash())
+ (outputId.outputName)
.exec();
}
});
@@ -1721,8 +1725,9 @@ std::optional<const Realisation> LocalStore::queryRealisation(
typedef std::optional<const Realisation> Ret;
return retrySQLite<Ret>([&]() -> Ret {
auto state(_state.lock());
- auto useQueryRealisedOutput(state->stmts->QueryRealisedOutput.use()(
- id.strHash())(id.outputName));
+ auto useQueryRealisedOutput(state->stmts->QueryRealisedOutput.use()
+ (id.strHash())
+ (id.outputName));
if (!useQueryRealisedOutput.next())
return std::nullopt;
auto realisationDbId = useQueryRealisedOutput.getInt(0);
@@ -1732,13 +1737,14 @@ std::optional<const Realisation> LocalStore::queryRealisation(
std::map<DrvOutput, StorePath> dependentRealisations;
auto useRealisationRefs(
- state->stmts->QueryRealisationReferences.use()(
- realisationDbId));
+ state->stmts->QueryRealisationReferences.use()
+ (realisationDbId));
while (useRealisationRefs.next()) {
auto depHash = useRealisationRefs.getStr(0);
auto depOutputName = useRealisationRefs.getStr(1);
- auto useQueryRealisedOutput(
- state->stmts->QueryRealisedOutput.use()(depHash)(depOutputName));
+ auto useQueryRealisedOutput(state->stmts->QueryRealisedOutput.use()
+ (depHash)
+ (depOutputName));
assert(useQueryRealisedOutput.next());
auto outputPath = parseStorePath(useQueryRealisedOutput.getStr(1));
auto depId = DrvOutput { Hash::parseAnyPrefixed(depHash), depOutputName };