+def _run_osm2pgsql(dsn: str, options: MutableMapping[str, Any]) -> None:
+ run_osm2pgsql(options)
+
+ # Handle deletions
+ with connect(dsn) as conn:
+ with conn.cursor() as cur:
+ cur.execute('SELECT flush_deleted_places()')
+ conn.commit()
+
+
+def add_data_from_file(dsn: str, fname: str, options: MutableMapping[str, Any]) -> int: