about summary refs log tree commit diff
path: root/src/store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-15T12·42+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-15T12·42+0000
commitebff82222c7b946e70e539389c0027529b6c7ad0 (patch)
tree4f3352f66c91f6f21ef47b1b07f763f4be0ffeb0 /src/store.hh
parent5fc71276430e8e6a4588fa54da692f81d5ada585 (diff)
* Refactoring: move all database manipulation into store.cc.
* Removed `--query --generators'.

Diffstat (limited to 'src/store.hh')
-rw-r--r--src/store.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/store.hh b/src/store.hh
index 7851b1e3d874..3d7575c3e86c 100644
--- a/src/store.hh
+++ b/src/store.hh
@@ -9,6 +9,15 @@
 using namespace std;
 
 
+/* Open the database environment. */
+void openDB();
+
+/* Create the required database tables. */
+void initDB();
+
+/* Get a transaction object. */
+void createStoreTransaction(Transaction & txn);
+
 /* Copy a path recursively. */
 void copyPath(const Path & src, const Path & dst);
 
@@ -24,6 +33,10 @@ void registerSuccessor(const Transaction & txn,
 
 /* Return the predecessors of the Nix expression stored at the given
    path. */
+bool querySuccessor(const Path & srcPath, Path & sucPath);
+
+/* Return the predecessors of the Nix expression stored at the given
+   path. */
 Paths queryPredecessors(const Path & sucPath);
 
 /* Register a substitute. */
@@ -42,6 +55,11 @@ bool isValidPath(const Path & path);
    the resulting path.  The resulting path is returned. */
 Path addToStore(const Path & srcPath);
 
+/* Like addToStore, but the path of the output is given, and the
+   contents written to the output path is a regular file containing
+   the given string. */
+void addTextToStore(const Path & dstPath, const string & s);
+
 /* Delete a value from the nixStore directory. */
 void deleteFromStore(const Path & path);