-
-
Notifications
You must be signed in to change notification settings - Fork 479
Expand file tree
/
Copy pathmiddle.cpp
More file actions
30 lines (24 loc) · 780 Bytes
/
middle.cpp
File metadata and controls
30 lines (24 loc) · 780 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
/**
* SPDX-License-Identifier: GPL-2.0-or-later
*
* This file is part of osm2pgsql (https://osm2pgsql.org/).
*
* Copyright (C) 2006-2026 by the osm2pgsql developer community.
* For a full list of authors see the git log.
*/
#include "middle-pgsql.hpp"
#include "middle-ram.hpp"
#include "middle.hpp"
#include "options.hpp"
middle_query_t::~middle_query_t() = default;
middle_t::~middle_t() = default;
std::shared_ptr<middle_t>
create_middle(std::shared_ptr<thread_pool_t> thread_pool,
options_t const &options)
{
if (options.slim) {
return std::make_shared<middle_pgsql_t>(std::move(thread_pool),
&options);
}
return std::make_shared<middle_ram_t>(std::move(thread_pool), &options);
}