Files
mayfly-go/server/internal/db/application/dto/sql_exec.go
meilin.huang e56788af3e refactor: dbm
2024-12-08 13:04:23 +08:00

32 lines
791 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package dto
import (
"io"
"mayfly-go/internal/db/dbm/dbi"
)
type DbSqlExecReq struct {
DbId uint64
Db string
Sql string // 需要执行的sql支持多条
Remark string // 执行备注
DbConn *dbi.DbConn
CheckFlow bool // 是否检查存储审批流程
}
type DbSqlExecRes struct {
Sql string `json:"sql"` // 执行的sql
ErrorMsg string `json:"errorMsg"` // 若执行失败,则将失败内容记录到该字段
Columns []*dbi.QueryColumn `json:"columns"` // 响应的列信息
Res []map[string]any `json:"res"` // 响应结果
}
type SqlReaderExec struct {
DbConn *dbi.DbConn
Reader io.Reader
Filename string
ClientId string // 客户端id若存在则会向其发送执行进度消息
}