feat(db): 实现数据库查询中的数组参数展开和空数组处理

- 在 Get 方法中添加无参数时的默认字段和 LIMIT 1 处理
- 实现 expandArrayPlaceholder 方法,自动展开 IN (?) 和 NOT IN (?) 中的数组参数
- 为空数组的 IN 条件生成 1=0 永假条件,NOT IN 生成 1=1 永真条件
- 在 queryWithRetry 和 execWithRetry 中集成数组占位符预处理
- 修复 where.go 中空切片条件的处理逻辑
- 添加完整的 IN/NOT IN 数组查询测试用例
- 更新 .gitignore 规则格式
This commit is contained in:
2026-01-22 07:16:42 +08:00
parent 595275e747
commit 60a12a09bd
7 changed files with 756 additions and 447 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
/.idea/*
.idea
/example/tpt/demo/
/*.exe
*.exe
/example/config