删除指定场景,返回是否成功(False 表示场景不存在)。
(self, name: str)
| 219 | return result |
| 220 | |
| 221 | def delete_scenario(self, name: str) -> bool: |
| 222 | """删除指定场景,返回是否成功(False 表示场景不存在)。""" |
| 223 | with self._lock, self._conn: |
| 224 | cur = self._conn.execute("DELETE FROM scenarios WHERE name=?", (name,)) |
| 225 | return cur.rowcount > 0 |
| 226 | |
| 227 | def set_baseline(self, name: str) -> bool: |
| 228 | """将指定场景设为基线,同时取消之前的基线标记。 |
no outgoing calls