about summary refs log tree commit diff
path: root/src/globals.cc
blob: 8c3ec38283ec0befc25ff4fbfc6faa2c7c1ffa86 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "globals.hh"
#include "db.hh"


Database nixDB;


string dbPath2Id = "path2id";
string dbId2Paths = "id2paths";
string dbSuccessors = "successors";
string dbSubstitutes = "substitutes";


string nixStore = "/UNINIT";
string nixDataDir = "/UNINIT";
string nixLogDir = "/UNINIT";
string nixDBPath = "/UNINIT";


void openDB()
{
    nixDB.open(nixDBPath);
}


void initDB()
{
    nixDB.createTable(dbPath2Id);
    nixDB.createTable(dbId2Paths);
    nixDB.createTable(dbSuccessors);
    nixDB.createTable(dbSubstitutes);
}