MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / clear_tables

Function clear_tables

scripts/clear_database.py:215–219  ·  view source on GitHub ↗

Delete all rows from the provided tables.

(conn: sqlite3.Connection, table_names: Iterable[str])

Source from the content-addressed store, hash-verified

213
214
215def clear_tables(conn: sqlite3.Connection, table_names: Iterable[str]) -> None:
216 """Delete all rows from the provided tables."""
217 cursor = conn.cursor()
218 for table_name in table_names:
219 cursor.execute(f"DELETE FROM {table_name}")
220
221
222def reset_sqlite_sequences(conn: sqlite3.Connection, table_names: Iterable[str]) -> None:

Callers 3

full_resetFunction · 0.85
benchmark_resetFunction · 0.85
mainFunction · 0.85

Calls 2

cursorMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected