]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/freeze.py
Merge pull request #3385 from mtmail/docs-reverse-only
[nominatim.git] / nominatim / tools / freeze.py
index 39c3279d3ce55718cc086cd7bf1278e5e82e9082..602def55b55ac3bb8b52212d43cab04d2361f37b 100644 (file)
@@ -50,3 +50,9 @@ def drop_flatnode_file(fpath: Optional[Path]) -> None:
     """
     if fpath and fpath.exists():
         fpath.unlink()
+
+def is_frozen(conn: Connection) -> bool:
+    """ Returns true if database is in a frozen state
+    """
+
+    return conn.table_exists('place') is False