Skip to content

Commit

Permalink
areas tests: use more execute_batch()
Browse files Browse the repository at this point in the history
Change-Id: I387551d3c937da9164fb64e87009c6a4d05bbbf5
  • Loading branch information
vmiklos committed Apr 16, 2024
1 parent d51c0a4 commit 8f495f2
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions src/areas/tests.rs
Expand Up @@ -2475,29 +2475,12 @@ fn test_relation_writer_ref_housenumbers() {
ctx.set_file_system(&file_system);
{
let conn = ctx.get_database_connection().unwrap();
conn.execute(
r#"insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)"#,
["gazdagret", "1", "Tűzkő utca", "", "", "", "", ""],
)
.unwrap();
conn.execute(
r#"insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)"#,
["gazdagret", "2", "Törökugrató utca", "", "", "", "", ""],
)
.unwrap();
conn.execute(
r#"insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)"#,
["gazdagret", "3", "OSM Name 1", "", "", "", "", ""],
)
.unwrap();
conn.execute(
r#"insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)"#,
["gazdagret", "4", "Hamzsabégi út", "", "", "", "", ""],
)
.unwrap();
conn.execute(
r#"insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)"#,
["gazdagret", "5", "Márton Áron tér", "", "", "", "", ""],
conn.execute_batch(
"insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values ('gazdagret', '1', 'Tűzkő utca', '', '', '', '', '');
insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values ('gazdagret', '2', 'Törökugrató utca', '', '', '', '', '');
insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values ('gazdagret', '3', 'OSM Name 1', '', '', '', '', '');
insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values ('gazdagret', '4', 'Hamzsabégi út', '', '', '', '', '');
insert into osm_streets (relation, osm_id, name, highway, service, surface, leisure, osm_type) values ('gazdagret', '5', 'Márton Áron tér', '', '', '', '', '');",
)
.unwrap();
}
Expand Down

0 comments on commit 8f495f2

Please sign in to comment.