Delete a key from state. Returns True if deleted, False if not found.
(self, key: str)
| 168 | self._conn.commit() |
| 169 | |
| 170 | def delete(self, key: str) -> bool: |
| 171 | """Delete a key from state. Returns True if deleted, False if not found.""" |
| 172 | with self._lock: |
| 173 | cur = self._conn.execute("DELETE FROM state WHERE key = ?", (key,)) |
| 174 | self._conn.commit() |
| 175 | return cur.rowcount > 0 |
| 176 | |
| 177 | def get_all(self) -> Dict[str, str]: |
| 178 | """Get all state key-value pairs.""" |