2003-06-16 13:33:38 +00:00
|
|
|
#include "globals.hh"
|
|
|
|
#include "db.hh"
|
|
|
|
|
|
|
|
|
2003-07-31 13:47:13 +00:00
|
|
|
Database nixDB;
|
|
|
|
|
|
|
|
|
2003-07-15 16:28:54 +00:00
|
|
|
string dbPath2Id = "path2id";
|
|
|
|
string dbId2Paths = "id2paths";
|
2003-07-04 12:18:06 +00:00
|
|
|
string dbSuccessors = "successors";
|
2003-07-10 13:41:28 +00:00
|
|
|
string dbSubstitutes = "substitutes";
|
|
|
|
|
2003-06-16 13:33:38 +00:00
|
|
|
|
2003-06-27 13:55:12 +00:00
|
|
|
string nixStore = "/UNINIT";
|
2003-07-10 13:41:28 +00:00
|
|
|
string nixDataDir = "/UNINIT";
|
2003-06-16 13:33:38 +00:00
|
|
|
string nixLogDir = "/UNINIT";
|
2003-07-31 13:47:13 +00:00
|
|
|
string nixDBPath = "/UNINIT";
|
|
|
|
|
|
|
|
|
|
|
|
void openDB()
|
|
|
|
{
|
|
|
|
nixDB.open(nixDBPath);
|
|
|
|
}
|
2003-06-16 13:33:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
void initDB()
|
|
|
|
{
|
2003-07-31 13:47:13 +00:00
|
|
|
nixDB.createTable(dbPath2Id);
|
|
|
|
nixDB.createTable(dbId2Paths);
|
|
|
|
nixDB.createTable(dbSuccessors);
|
|
|
|
nixDB.createTable(dbSubstitutes);
|
2003-06-16 13:33:38 +00:00
|
|
|
}
|