(key: string)
| 414 | } |
| 415 | |
| 416 | public dbGet(key: string): any { |
| 417 | try { |
| 418 | const docId = `ZTOOLS/${key}` |
| 419 | const doc = lmdbInstance.get(docId) |
| 420 | |
| 421 | if (!doc) { |
| 422 | return null |
| 423 | } |
| 424 | |
| 425 | return doc.data |
| 426 | } catch (error) { |
| 427 | console.error('[Database] dbGet 失败:', key, error) |
| 428 | return null |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | /** |
| 433 | * 计算字典序的下一个前缀(用于精确的范围查询) |
no test coverage detected