mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 15:02:42 +01:00
Use a more space/time-efficient representation for the eval cache
This commit is contained in:
parent
bdb3226607
commit
aaa109565e
6 changed files with 102 additions and 51 deletions
|
|
@ -588,7 +588,7 @@ uint64_t LocalStore::addValidPath(State & state,
|
|||
(concatStringsSep(" ", info.sigs), !info.sigs.empty())
|
||||
(info.ca, !info.ca.empty())
|
||||
.exec();
|
||||
uint64_t id = sqlite3_last_insert_rowid(state.db);
|
||||
uint64_t id = state.db.getLastInsertedRowId();
|
||||
|
||||
/* If this is a derivation, then store the derivation outputs in
|
||||
the database. This is useful for the garbage collector: it can
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ void SQLite::exec(const std::string & stmt)
|
|||
});
|
||||
}
|
||||
|
||||
uint64_t SQLite::getLastInsertedRowId()
|
||||
{
|
||||
return sqlite3_last_insert_rowid(db);
|
||||
}
|
||||
|
||||
void SQLiteStmt::create(sqlite3 * db, const string & sql)
|
||||
{
|
||||
checkInterrupt();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ struct SQLite
|
|||
void isCache();
|
||||
|
||||
void exec(const std::string & stmt);
|
||||
|
||||
uint64_t getLastInsertedRowId();
|
||||
};
|
||||
|
||||
/* RAII wrapper to create and destroy SQLite prepared statements. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue