mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-20 21:30:28 +08:00
refactor: 清理 parser worker rag merger 的历史类型问题
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
|
||||
import { openDatabase } from '../core'
|
||||
|
||||
// 查询超时时间(毫秒)
|
||||
const QUERY_TIMEOUT_MS = 10000
|
||||
|
||||
/**
|
||||
* SQL 执行结果
|
||||
*/
|
||||
@@ -106,13 +103,6 @@ export function executePluginQuery<T = Record<string, any>>(
|
||||
return stmt.all(params) as T[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查 SQL 是否包含 LIMIT 子句
|
||||
*/
|
||||
function hasLimit(sql: string): boolean {
|
||||
return /\bLIMIT\s+\d+/i.test(sql)
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行用户 SQL 查询
|
||||
* - 只支持 SELECT 语句
|
||||
|
||||
Reference in New Issue
Block a user