(key: string)
| 120 | |
| 121 | // 删除配置 |
| 122 | static delete(key: string): void { |
| 123 | this.init(); |
| 124 | |
| 125 | try { |
| 126 | const stmt = this.db.prepare("DELETE FROM config WHERE key = ?"); |
| 127 | stmt.run(key); |
| 128 | } catch (error) { |
| 129 | console.error("删除配置失败:", error); |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | // 关闭数据库连接 |
| 134 | static close(): void { |
no test coverage detected