-
-
Notifications
You must be signed in to change notification settings - Fork 480
Expand file tree
/
Copy pathpgsql-params.hpp
More file actions
42 lines (32 loc) · 907 Bytes
/
Copy pathpgsql-params.hpp
File metadata and controls
42 lines (32 loc) · 907 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
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef OSM2PGSQL_PGSQL_PARAMS_HPP
#define OSM2PGSQL_PGSQL_PARAMS_HPP
/**
* SPDX-License-Identifier: GPL-2.0-or-later
*
* This file is part of osm2pgsql (https://osm2pgsql.org/).
*
* Copyright (C) 2006-2024 by the osm2pgsql developer community.
* For a full list of authors see the git log.
*/
#include "format.hpp"
#include <map>
#include <string>
#include <utility>
#include <vector>
/**
* PostgreSQL connection parameters.
*/
class connection_params_t
{
public:
connection_params_t() { m_params["client_encoding"] = "UTF8"; }
void set(std::string const ¶m, std::string const &value)
{
m_params[param] = value;
}
auto begin() const noexcept { return m_params.begin(); }
auto end() const noexcept { return m_params.end(); }
private:
std::map<std::string, std::string> m_params;
}; // class connection_params_t
#endif // OSM2PGSQL_PGSQL_PARAMS_HPP