MCPcopy Create free account
hub / github.com/Tong89/smartNode / delete_scenario

Method delete_scenario

backend/store.py:221–225  ·  view source on GitHub ↗

删除指定场景,返回是否成功(False 表示场景不存在)。

(self, name: str)

Source from the content-addressed store, hash-verified

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 """将指定场景设为基线,同时取消之前的基线标记。

Callers 3

scenarios_deleteFunction · 0.80
test_delete_scenarioMethod · 0.80
test_delete_missingMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_delete_scenarioMethod · 0.64
test_delete_missingMethod · 0.64