aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-06-21 16:28:06 +0200
committerregnat <rg@regnat.ovh>2021-06-21 16:28:06 +0200
commitdcabb461242e5c38e0a2780dc5869b91c13241d6 (patch)
tree68ae280a98ccc512fe6b741fb8f54b9fb29c55b9 /src/libstore/local-store.cc
parent1f3ff0d193c270f7b97af4aa3e463be01dbe5f2d (diff)
Shorten a stupidly long sql query name
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index debe70037..45bb5efc8 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -59,8 +59,8 @@ struct LocalStore::State::Stmts {
SQLiteStmt QueryAllRealisedOutputs;
SQLiteStmt QueryPathFromHashPart;
SQLiteStmt QueryValidPaths;
- SQLiteStmt QueryRealisationRealisationReferences;
- SQLiteStmt AddRealisationRealisationReference;
+ SQLiteStmt QueryRealisationReferences;
+ SQLiteStmt AddRealisationReference;
};
int getSchema(Path schemaPath)
@@ -362,13 +362,13 @@ LocalStore::LocalStore(const Params & params)
where drvPath = ?
;
)");
- state->stmts->QueryRealisationRealisationReferences.create(state->db,
+ state->stmts->QueryRealisationReferences.create(state->db,
R"(
select drvPath, outputName from Realisations
join RealisationsRefs on realisationReference = Realisations.id
where referrer = ?;
)");
- state->stmts->AddRealisationRealisationReference.create(state->db,
+ state->stmts->AddRealisationReference.create(state->db,
R"(
insert or replace into RealisationsRefs (referrer, realisationReference)
values (
@@ -719,7 +719,7 @@ void LocalStore::registerDrvOutput(const Realisation & info)
.exec();
uint64_t myId = state->db.getLastInsertedRowId();
for (auto & [outputId, _] : info.dependentRealisations) {
- state->stmts->AddRealisationRealisationReference
+ state->stmts->AddRealisationReference
.use()(myId)(outputId.strHash())(outputId.outputName)
.exec();
}
@@ -1732,7 +1732,7 @@ std::optional<const Realisation> LocalStore::queryRealisation(
std::map<DrvOutput, StorePath> dependentRealisations;
auto useRealisationRefs(
- state->stmts->QueryRealisationRealisationReferences.use()(
+ state->stmts->QueryRealisationReferences.use()(
realisationDbId));
while (useRealisationRefs.next()) {
auto depHash = useRealisationRefs.getStr(0);