test(db): 添加 OR 条件处理的单元测试并修复 WHERE 子句逻辑

- 添加了 TestWhereWithORCondition 测试函数验证 OR 条件的括号包裹
- 修复了 where.go 中条件计数变量名称从 normalCondCount 改为 condCount
- 实现了 OR/AND 组条件的括号包裹逻辑确保 SQL 语法正确
- 添加了空条件检查避免生成无效的 SQL 片段
- 更新了 .gitignore 文件添加日志文件忽略规则
This commit is contained in:
2026-01-23 01:51:35 +08:00
parent 64c2e800b0
commit cce765e735
3 changed files with 185 additions and 11 deletions
+2 -1
View File
@@ -2,4 +2,5 @@
.idea
/example/tpt/demo/
*.exe
/example/config
/example/config
/.cursor/*.log