增加获取数据库连接的方法

This commit is contained in:
2024-08-23 12:26:03 +08:00
parent 21ad50b273
commit e5233b4fae
4 changed files with 29 additions and 18 deletions

View File

@ -7,6 +7,8 @@
// Date : 2024-08-21 16:05
package define
import "gorm.io/gorm"
// Api2SqlParam 接口转sql的输入配置
//
// Author : go_developer@163.com<白茶清欢>
@ -42,6 +44,7 @@ type Api2SqlParam struct {
WithCount bool `json:"with_count"` // 是否返回数据总量, 仅 sqlType = list 生效
ValueList []*Api2SqlParamValue `json:"value_list"` // 字段列表
TableColumnConfig []*ColumnInfo `json:"table_column_config"` // 表字段配置
Tx *gorm.DB `json:"-"` // 前后已有的数据库连接, 直接复用
}
// Api2SqlParamValue ...