diff --git a/docs/python-api.rst b/docs/python-api.rst index f9371d5..267591a 100644 --- a/docs/python-api.rst +++ b/docs/python-api.rst @@ -123,6 +123,27 @@ You can pass ``strict=True`` to enable `SQLite STRICT mode "Database": + return self + + def __exit__(self, exc_type, exc_val, exc_tb) -> None: + self.close() + def close(self) -> None: "Close the SQLite connection, and the underlying database file" self.conn.close()