[Bug] Missing complete exception handling in tile- and building-entity insertion
The exception handling of the SpatiaLite database when inserting tile or building entities that violate the UNIQUE
constraint is incomplete in exposure-lib. Here, we have two options to tackle the problem:
- Given that the
insert_tile_entity
andinsert_building_entity
functions are returning the newly inserted or already existing entity with the same ID (quadkey
orosm_id
), I suggest to avoid the exception handling and first query the ID of the entity and only insert if it doesn't exist. - Expand the exception handling to all parts of the function.
Edited by Danijel Schorlemmer