(self, query: str)
| 60 | self.conn.close() |
| 61 | |
| 62 | def query_one(self, query: str) -> dict[Any, Any]: |
| 63 | with self.conn.cursor() as cursor: |
| 64 | cursor.execute(query) |
| 65 | cols = [d[0].lower() for d in cursor.description] |
| 66 | row = {key: val for key, val in zip(cols, cursor.fetchone())} |
| 67 | return cast(dict[Any, Any], row) |
| 68 | |
| 69 | def query_all(self, query: str) -> DictGenerator: |
| 70 | with self.conn.cursor() as cursor: |