From dcabb461242e5c38e0a2780dc5869b91c13241d6 Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 21 Jun 2021 16:28:06 +0200 Subject: [PATCH] Shorten a stupidly long sql query name --- src/libstore/local-store.cc | 12 ++++++------ 1 file 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 LocalStore::queryRealisation( std::map dependentRealisations; auto useRealisationRefs( - state->stmts->QueryRealisationRealisationReferences.use()( + state->stmts->QueryRealisationReferences.use()( realisationDbId)); while (useRealisationRefs.next()) { auto depHash = useRealisationRefs.getStr(0);