@@ -323,7 +323,7 @@ void middle_pgsql_t::node_set(osmium::Node const &node)
323323 if (!m_options->flat_node_file .empty ()) {
324324 m_persistent_cache->set (node.id (), node.location ());
325325 } else {
326- m_db_copy.new_line (m_tables (osmium::item_type::node ).copy_target ());
326+ m_db_copy.new_line (m_tables. nodes ( ).copy_target ());
327327
328328 m_db_copy.add_columns (node.id (), node.location ().y (),
329329 node.location ().x ());
@@ -364,7 +364,7 @@ void middle_pgsql_t::node_delete(osmid_t osm_id)
364364 if (!m_options->flat_node_file .empty ()) {
365365 m_persistent_cache->set (osm_id, osmium::Location{});
366366 } else {
367- m_db_copy.new_line (m_tables (osmium::item_type::node ).copy_target ());
367+ m_db_copy.new_line (m_tables. nodes ( ).copy_target ());
368368 m_db_copy.delete_object (osm_id);
369369 }
370370}
@@ -386,7 +386,7 @@ idlist_t middle_pgsql_t::get_rels_by_way(osmid_t osm_id)
386386
387387void middle_pgsql_t::way_set (osmium::Way const &way)
388388{
389- m_db_copy.new_line (m_tables (osmium::item_type::way ).copy_target ());
389+ m_db_copy.new_line (m_tables. ways ( ).copy_target ());
390390
391391 m_db_copy.add_column (way.id ());
392392
@@ -485,7 +485,7 @@ middle_query_pgsql_t::rel_members_get(osmium::Relation const &rel,
485485void middle_pgsql_t::way_delete (osmid_t osm_id)
486486{
487487 assert (m_options->append );
488- m_db_copy.new_line (m_tables (osmium::item_type::way ).copy_target ());
488+ m_db_copy.new_line (m_tables. ways ( ).copy_target ());
489489 m_db_copy.delete_object (osm_id);
490490}
491491
@@ -498,7 +498,7 @@ void middle_pgsql_t::relation_set(osmium::Relation const &rel)
498498 parts[osmium::item_type_to_nwr_index (m.type ())].push_back (m.ref ());
499499 }
500500
501- m_db_copy.new_line (m_tables (osmium::item_type::relation ).copy_target ());
501+ m_db_copy.new_line (m_tables. relations ( ).copy_target ());
502502
503503 // id, way offset, relation offset
504504 m_db_copy.add_columns (rel.id (), parts[0 ].size (),
@@ -561,30 +561,30 @@ void middle_pgsql_t::relation_delete(osmid_t osm_id)
561561{
562562 assert (m_options->append );
563563
564- m_db_copy.new_line (m_tables (osmium::item_type::relation ).copy_target ());
564+ m_db_copy.new_line (m_tables. relations ( ).copy_target ());
565565 m_db_copy.delete_object (osm_id);
566566}
567567
568568void middle_pgsql_t::after_nodes ()
569569{
570570 m_db_copy.sync ();
571571 if (m_options->flat_node_file .empty ()) {
572- auto const &table = m_tables (osmium::item_type::node );
572+ auto const &table = m_tables. nodes ( );
573573 analyze_table (m_db_connection, table.schema (), table.name ());
574574 }
575575}
576576
577577void middle_pgsql_t::after_ways ()
578578{
579579 m_db_copy.sync ();
580- auto const &table = m_tables (osmium::item_type::way );
580+ auto const &table = m_tables. ways ( );
581581 analyze_table (m_db_connection, table.schema (), table.name ());
582582}
583583
584584void middle_pgsql_t::after_relations ()
585585{
586586 m_db_copy.sync ();
587- auto const &table = m_tables (osmium::item_type::relation );
587+ auto const &table = m_tables. relations ( );
588588 analyze_table (m_db_connection, table.schema (), table.name ());
589589
590590 // release the copy thread and its database connection
@@ -800,13 +800,12 @@ middle_pgsql_t::middle_pgsql_t(options_t const *options)
800800 log_debug (" You don't have a bucket index. See manual for details." );
801801 }
802802
803- m_tables (osmium::item_type::node ) =
803+ m_tables. nodes ( ) =
804804 table_desc{*options, sql_for_nodes (options->flat_node_file .empty ())};
805- m_tables (osmium::item_type::way ) =
805+ m_tables. ways ( ) =
806806 table_desc{*options, sql_for_ways (has_bucket_index,
807807 options->way_node_index_id_shift )};
808- m_tables (osmium::item_type::relation) =
809- table_desc{*options, sql_for_relations ()};
808+ m_tables.relations () = table_desc{*options, sql_for_relations ()};
810809}
811810
812811std::shared_ptr<middle_query_t >
0 commit comments