Return whether a SQLite table exists in the PaperFlow database.
(table_name: str)
| 90 | def _row_to_node(row: sqlite3.Row) -> Dict[str, Any]: |
| 91 | node = dict(row) |
| 92 | node["metadata"] = _json_loads(node.pop("metadata_json", None)) |
| 93 | return node |
| 94 | |
| 95 | |
| 96 | def _rows_to_nodes(rows: Iterable[sqlite3.Row]) -> List[Dict[str, Any]]: |
| 97 | return [_row_to_node(row) for row in rows] |
| 98 | |
| 99 | |
| 100 | def table_exists(table_name: str) -> bool: |
| 101 | """Return whether a SQLite table exists in the PaperFlow database.""" |
| 102 | conn = db_ops.get_connection() |
| 103 | row = conn.execute( |
no test coverage detected