feat: 新增 SQLite3 虚拟表框架及方言扩展

- 新增 dialect/sqlite3/vtab 包,提供干净的虚拟表接口(Module/Table/Cursor)
- 适配层自动将 BestIndex 约束与 Filter 值绑定(ConstraintInfo.Value),无需手动编解码 IdxStr
- 支持 OpLIMIT/OpOFFSET 约束下推
- 新增 SupportsDistinct 方言选项,控制 SELECT 级和表达式级 DISTINCT 生成
- sqlite3 方言注册 IF() 函数支持
This commit is contained in:
2026-04-18 13:41:41 +08:00
parent 2221ca0ddb
commit ac81f1ff0b
13 changed files with 1443 additions and 9 deletions
+3
View File
@@ -34,6 +34,8 @@ type (
SupportsWithCTERecursive bool
// Set to true if multiple tables are supported in UPDATE statement. (DEFAULT=true)
SupportsMultipleUpdateTables bool
// Set to true if DISTINCT is supported (DEFAULT=true)
SupportsDistinct bool
// Set to true if DISTINCT ON is supported (DEFAULT=true)
SupportsDistinctOn bool
// Set to true if LATERAL queries are supported (DEFAULT=true)
@@ -420,6 +422,7 @@ func DefaultDialectOptions() *SQLDialectOptions {
SupportsConflictTarget: true,
SupportsWithCTE: true,
SupportsWithCTERecursive: true,
SupportsDistinct: true,
SupportsDistinctOn: true,
WrapCompoundsInParens: true,
SupportsWindowFunction: true,