-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.hpp
More file actions
30 lines (22 loc) · 728 Bytes
/
database.hpp
File metadata and controls
30 lines (22 loc) · 728 Bytes
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
// Copyright 2015, Jan Vogt.
// Author: Jan Vogt <jan.vogt@me.com>
#ifndef MULTIGRAPH_EDGE_CONTINUITY_DATABASE_HPP_
#define MULTIGRAPH_EDGE_CONTINUITY_DATABASE_HPP_
#include <string>
#include <vector>
#include <pqxx/pqxx>
#include "graph/path.hpp"
#include "graph/edge.hpp"
// Database connection for reading and writing results.
class DataBase {
public:
// Create a new instance using the given connection string.
explicit DataBase(const std::string& dsn): con_(dsn){};
// Read paths stored in db.
std::vector<Graph::Path> readPaths();
// Write edges back to db.
//void writeEdges(const &std::vector<Graph::Edge>);
private:
pqxx::connection con_;
};
#endif // MULTIGRAPH_EDGE_CONTINUITY_DATABASE_HPP_