forked from osm2pgsql-dev/osm2pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgsql-helper.hpp
More file actions
45 lines (34 loc) · 1.28 KB
/
Copy pathpgsql-helper.hpp
File metadata and controls
45 lines (34 loc) · 1.28 KB
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
43
44
45
#ifndef OSM2PGSQL_PGSQL_HELPER_HPP
#define OSM2PGSQL_PGSQL_HELPER_HPP
/**
* SPDX-License-Identifier: GPL-2.0-or-later
*
* This file is part of osm2pgsql (https://osm2pgsql.org/).
*
* Copyright (C) 2006-2021 by the osm2pgsql developer community.
* For a full list of authors see the git log.
*/
#include "osmtypes.hpp"
#include <string>
class pg_conn_t;
class pg_result_t;
/**
* Iterate over the result from a pgsql query and generate a list of all the
* ids from the first column.
*
* \param result The result to iterate over.
* \returns A list of ids.
*/
idlist_t get_ids_from_result(pg_result_t const &result);
idlist_t get_ids_from_db(pg_conn_t const *db_connection, char const *stmt,
osmid_t id);
void create_geom_check_trigger(pg_conn_t *db_connection,
std::string const &schema,
std::string const &table,
std::string const &geom_column);
void drop_geom_check_trigger(pg_conn_t *db_connection,
std::string const &schema,
std::string const &table);
void analyze_table(pg_conn_t const &db_connection, std::string const &schema,
std::string const &name);
#endif // OSM2PGSQL_PGSQL_HELPER_HPP