about summary refs log tree commit diff
path: root/src/db.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-17T12·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-17T12·27+0000
commitb3fc38bf6a407f962b83089b2e13cbc90dd53042 (patch)
tree9b5200845516f93a79255dc7857500556c2d0e2a /src/db.cc
parent71cc3ceae5c5dd97a0faa2dab3da3dd0c479b0b5 (diff)
* For debugging: `nix --verify' to check the consistency of the
  database and store.

Diffstat (limited to 'src/db.cc')
-rw-r--r--src/db.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/db.cc b/src/db.cc
index 64f9813a400f..a8741342ce92 100644
--- a/src/db.cc
+++ b/src/db.cc
@@ -157,7 +157,7 @@ void delDB(const string & filename, const string & dbname,
 
 
 void enumDB(const string & filename, const string & dbname,
-    DBPairs & contents)
+    Strings & keys)
 {
     try {
 
@@ -168,11 +168,9 @@ void enumDB(const string & filename, const string & dbname,
         DbcClose cursorCloser(cursor);
 
         Dbt kt, dt;
-        while (cursor->get(&kt, &dt, DB_NEXT) != DB_NOTFOUND) {
-            string key((char *) kt.get_data(), kt.get_size());
-            string data((char *) dt.get_data(), dt.get_size());
-            contents.push_back(DBPair(key, data));
-        }
+        while (cursor->get(&kt, &dt, DB_NEXT) != DB_NOTFOUND)
+            keys.push_back(
+                string((char *) kt.get_data(), kt.get_size()));
 
     } catch (DbException e) { rethrow(e); }
 }