Delete container record by ID. Args: container_id: Container ID to delete
(self, container_id: str)
| 215 | conn.close() |
| 216 | |
| 217 | def delete_by_id(self, container_id: str) -> None: |
| 218 | """Delete container record by ID. |
| 219 | |
| 220 | Args: |
| 221 | container_id: Container ID to delete |
| 222 | """ |
| 223 | conn = self._get_connection() |
| 224 | try: |
| 225 | cursor = conn.cursor() |
| 226 | cursor.execute( |
| 227 | "DELETE FROM containers WHERE container_id = ?", (container_id,) |
| 228 | ) |
| 229 | conn.commit() |
| 230 | finally: |
| 231 | conn.close() |
| 232 | |
| 233 | def delete_by_name(self, container_name: str) -> None: |
| 234 | """Delete container record by name. |