1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 23:03:53 -04:00

Rename queryValidPaths() to queryAllValidPaths()

This commit is contained in:
Eelco Dolstra 2012-07-11 10:49:04 -04:00
parent eb3036da87
commit 667d5f1936
9 changed files with 17 additions and 17 deletions

View file

@ -744,7 +744,7 @@ bool LocalStore::isValidPath(const Path & path)
} }
PathSet LocalStore::queryValidPaths() PathSet LocalStore::queryAllValidPaths()
{ {
SQLiteStmt stmt; SQLiteStmt stmt;
stmt.create(db, "select path from ValidPaths"); stmt.create(db, "select path from ValidPaths");
@ -1449,7 +1449,7 @@ void LocalStore::verifyStore(bool checkContents)
/* Check whether all valid paths actually exist. */ /* Check whether all valid paths actually exist. */
printMsg(lvlInfo, "checking path existence..."); printMsg(lvlInfo, "checking path existence...");
PathSet validPaths2 = queryValidPaths(), validPaths, done; PathSet validPaths2 = queryAllValidPaths(), validPaths, done;
foreach (PathSet::iterator, i, validPaths2) foreach (PathSet::iterator, i, validPaths2)
verifyPath(*i, store, done, validPaths); verifyPath(*i, store, done, validPaths);

View file

@ -99,7 +99,7 @@ public:
bool isValidPath(const Path & path); bool isValidPath(const Path & path);
PathSet queryValidPaths(); PathSet queryAllValidPaths();
ValidPathInfo queryPathInfo(const Path & path); ValidPathInfo queryPathInfo(const Path & path);

View file

@ -178,7 +178,7 @@ void LocalStore::optimiseStore(bool dryRun, OptimiseStats & stats)
{ {
HashToPath hashToPath; HashToPath hashToPath;
PathSet paths = queryValidPaths(); PathSet paths = queryAllValidPaths();
foreach (PathSet::iterator, i, paths) { foreach (PathSet::iterator, i, paths) {
addTempRoot(*i); addTempRoot(*i);

View file

@ -217,10 +217,10 @@ bool RemoteStore::isValidPath(const Path & path)
} }
PathSet RemoteStore::queryValidPaths() PathSet RemoteStore::queryAllValidPaths()
{ {
openConnection(); openConnection();
writeInt(wopQueryValidPaths, to); writeInt(wopQueryAllValidPaths, to);
processStderr(); processStderr();
return readStorePaths<PathSet>(from); return readStorePaths<PathSet>(from);
} }

View file

@ -27,7 +27,7 @@ public:
bool isValidPath(const Path & path); bool isValidPath(const Path & path);
PathSet queryValidPaths(); PathSet queryAllValidPaths();
ValidPathInfo queryPathInfo(const Path & path); ValidPathInfo queryPathInfo(const Path & path);

View file

@ -110,20 +110,20 @@ public:
virtual ~StoreAPI() { } virtual ~StoreAPI() { }
/* Checks whether a path is valid. */ /* Check whether a path is valid. */
virtual bool isValidPath(const Path & path) = 0; virtual bool isValidPath(const Path & path) = 0;
/* Query the set of valid paths. */ /* Query the set of all valid paths. */
virtual PathSet queryValidPaths() = 0; virtual PathSet queryAllValidPaths() = 0;
/* Query information about a valid path. */ /* Query information about a valid path. */
virtual ValidPathInfo queryPathInfo(const Path & path) = 0; virtual ValidPathInfo queryPathInfo(const Path & path) = 0;
/* Queries the hash of a valid path. */ /* Query the hash of a valid path. */
virtual Hash queryPathHash(const Path & path) = 0; virtual Hash queryPathHash(const Path & path) = 0;
/* Queries the set of outgoing FS references for a store path. /* Query the set of outgoing FS references for a store path. The
The result is not cleared. */ result is not cleared. */
virtual void queryReferences(const Path & path, virtual void queryReferences(const Path & path,
PathSet & references) = 0; PathSet & references) = 0;

View file

@ -34,7 +34,7 @@ typedef enum {
wopCollectGarbage = 20, wopCollectGarbage = 20,
wopQuerySubstitutablePathInfo = 21, wopQuerySubstitutablePathInfo = 21,
wopQueryDerivationOutputs = 22, wopQueryDerivationOutputs = 22,
wopQueryValidPaths = 23, wopQueryAllValidPaths = 23,
wopQueryFailedPaths = 24, wopQueryFailedPaths = 24,
wopClearFailedPaths = 25, wopClearFailedPaths = 25,
wopQueryPathInfo = 26, wopQueryPathInfo = 26,

View file

@ -465,7 +465,7 @@ static void opDumpDB(Strings opFlags, Strings opArgs)
if (!opFlags.empty()) throw UsageError("unknown flag"); if (!opFlags.empty()) throw UsageError("unknown flag");
if (!opArgs.empty()) if (!opArgs.empty())
throw UsageError("no arguments expected"); throw UsageError("no arguments expected");
PathSet validPaths = store->queryValidPaths(); PathSet validPaths = store->queryAllValidPaths();
foreach (PathSet::iterator, i, validPaths) foreach (PathSet::iterator, i, validPaths)
cout << store->makeValidityRegistration(singleton<PathSet>(*i), true, true); cout << store->makeValidityRegistration(singleton<PathSet>(*i), true, true);
} }

View file

@ -563,9 +563,9 @@ static void performOp(unsigned int clientVersion,
break; break;
} }
case wopQueryValidPaths: { case wopQueryAllValidPaths: {
startWork(); startWork();
PathSet paths = store->queryValidPaths(); PathSet paths = store->queryAllValidPaths();
stopWork(); stopWork();
writeStrings(paths, to); writeStrings(paths, to);
break; break;