Update public source

This commit is contained in:
2026-10-07 09:13:34 +03:00
parent f231cc5b1f
commit ea8ca2a613
5 changed files with 332 additions and 12 deletions
+47
View File
@@ -41,6 +41,27 @@ class MethodsRepository:
),
)
def update_method(
self,
method_id: str,
name: str,
description: str | None = None,
) -> None:
self._conn.execute(
"""
UPDATE crack_methods
SET
name = ?,
description = ?
WHERE id = ?
""",
(
name,
description,
method_id,
),
)
def get_method(self, method_id: str) -> sqlite3.Row | None:
row = self._conn.execute(
"""
@@ -99,6 +120,32 @@ class MethodsRepository:
),
)
def update_method_version(
self,
method_id: str,
version: int,
definition: dict[str, Any],
) -> None:
self._conn.execute(
"""
UPDATE crack_method_versions
SET
definition_json = ?
WHERE method_id = ?
AND version = ?
""",
(
json.dumps(
definition,
ensure_ascii=False,
separators=(",", ":"),
sort_keys=True,
),
method_id,
version,
),
)
def get_method_version(
self,
method_id: str,