blob: 42aa9ae5acafb7abb4eff0c1673d8bcda3b9bdb9 (
plain)
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
33
34
35
36
|
#pragma once
#include "base/exception.hpp"
#include "base/geo_object_id.hpp"
#include "base/macros.hpp"
#include <cstdint>
#include <string>
#include <vector>
namespace osm
{
class Id;
}
struct sqlite3;
namespace generator
{
DECLARE_EXCEPTION(DBNotFound, RootException);
class UGCDB
{
public:
UGCDB(std::string const & path);
~UGCDB();
WARN_UNUSED_RESULT bool Get(base::GeoObjectId const & id, std::vector<uint8_t> & blob);
WARN_UNUSED_RESULT bool Exec(std::string const & statement);
private:
bool ValueToBlob(std::string const & src, std::vector<uint8_t> & blob);
sqlite3 * m_db = nullptr;
};
} // namespace generator
|