(self)
| 111 | self.execute(self._CREATE_HOST_ID_TABLE) |
| 112 | |
| 113 | def _ensure_host_id(self): |
| 114 | cur = self.execute(self._CHECK_HOST_ID) |
| 115 | host_id_ct = cur.fetchone()[0] |
| 116 | if host_id_ct == 0: |
| 117 | self.execute( |
| 118 | self._INSERT_HOST_ID, |
| 119 | # Hardcode `0` as primary key to ensure |
| 120 | # there's only ever 1 host id in the table. |
| 121 | ( |
| 122 | 0, |
| 123 | str(uuid.uuid4()), |
| 124 | ), |
| 125 | ) |
| 126 | |
| 127 | def _try_to_enable_wal(self): |
| 128 | try: |
no test coverage detected