release: v0.2.1 生产加固 — WAL CRC/约束激活/Hybrid提交顺序/RESTRICT外键/浏览器兼容表/debug模式/onError回调
CI / test (20.x) (push) Successful in 9m58s
CI / test (18.x) (push) Successful in 10m0s
CI / test (22.x) (push) Successful in 10m0s
CI / test (24.x) (push) Successful in 9m56s

This commit is contained in:
thzxx
2026-07-27 20:47:30 +08:00
parent 620cd11521
commit e6efa39d48
18 changed files with 357 additions and 27 deletions
+12
View File
@@ -58,6 +58,10 @@ interface DatabaseConfig {
onReady?: (db: unknown) => void;
/** 错误回调 */
onError?: (error: Error) => void;
/** 查询结果行数上限(默认 10000,0 表示不限制) */
maxRowsPerQuery?: number;
/** 调试模式(启用后输出详细操作日志) */
debug?: boolean;
}
/** Where 条件操作符 */
type WhereOperator = '$eq' | '$ne' | '$gt' | '$gte' | '$lt' | '$lte' | '$in' | '$nin' | '$like' | '$and' | '$or' | '$not';
@@ -434,6 +438,10 @@ declare class MetonaSqlark {
private config;
private ready;
private tableCache;
/** 查询结果行数上限 */
get maxRowsPerQuery(): number;
/** 调试模式 */
get debug(): boolean;
constructor(config: DatabaseConfig);
/** 初始化数据库(创建引擎、打开连接) */
init(): Promise<void>;
@@ -483,6 +491,10 @@ declare class MetonaSqlark {
getEngine(): IStorageEngine;
private createEngine;
private ensureReady;
/** 错误回调分发 */
private _onError;
/** 调试日志 */
private _debug;
}
/**