]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/steps/place_inserter.py
make DB helper functions free functions
[nominatim.git] / test / bdd / steps / place_inserter.py
index 6e7e6a75dc7c787f2883abd475c5b4b79a6712ef..c033ac17f008ce3bc46237815795a5dccbd8e060 100644 (file)
@@ -92,6 +92,12 @@ class PlaceColumn:
         else:
             self.columns[column] = {key: value}
 
+    def db_delete(self, cursor):
+        """ Issue a delete for the given OSM object.
+        """
+        cursor.execute('DELETE FROM place WHERE osm_type = %s and osm_id = %s',
+                       (self.columns['osm_type'] , self.columns['osm_id']))
+
     def db_insert(self, cursor):
         """ Insert the collected data into the database.
         """