File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ void db_deleter_by_id_t::delete_rows(std::string const &table,
2121 }
2222 sql[sql.size () - 1 ] = ' )' ;
2323
24- conn->exec (fmt::to_string (sql));
24+ sql.push_back (' \0 ' );
25+ conn->exec (sql.data ());
2526}
2627
2728void db_deleter_by_type_and_id_t::delete_rows (std::string const &table,
@@ -54,8 +55,6 @@ void db_deleter_by_type_and_id_t::delete_rows(std::string const &table,
5455 " ) AS t (osm_type, osm_id) WHERE"
5556 " p.{} = t.osm_type AND p.{} = t.osm_id" ,
5657 type, column.c_str () + pos + 1 );
57-
58- conn->exec (fmt::to_string (sql));
5958 } else {
6059 fmt::format_to (sql, FMT_STRING (" DELETE FROM {} WHERE {} IN (" ), table,
6160 column);
@@ -64,8 +63,10 @@ void db_deleter_by_type_and_id_t::delete_rows(std::string const &table,
6463 format_to (sql, FMT_STRING (" {}," ), item.osm_id );
6564 }
6665 sql[sql.size () - 1 ] = ' )' ;
67- conn->exec (fmt::to_string (sql));
6866 }
67+
68+ sql.push_back (' \0 ' );
69+ conn->exec (sql.data ());
6970}
7071
7172db_copy_thread_t ::db_copy_thread_t (std::string const &conninfo)
You can’t perform that action at this time.
0 commit comments