mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
improve error message for package gdb
This commit is contained in:
@ -128,15 +128,6 @@ func (c *Core) DoFilter(ctx context.Context, link Link, sql string, args []inter
|
||||
return sql, args, nil
|
||||
}
|
||||
|
||||
type sqlParsingHandlerInput struct {
|
||||
DoCommitInput
|
||||
FormattedSql string
|
||||
}
|
||||
|
||||
type sqlParsingHandlerOutput struct {
|
||||
DoCommitInput
|
||||
}
|
||||
|
||||
// DoCommit commits current sql and arguments to underlying sql driver.
|
||||
func (c *Core) DoCommit(ctx context.Context, in DoCommitInput) (out DoCommitOutput, err error) {
|
||||
// Inject internal data into ctx, especially for transaction creating.
|
||||
@ -266,7 +257,7 @@ func (c *Core) DoCommit(ctx context.Context, in DoCommitInput) (out DoCommitOutp
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
err = gerror.NewCodef(
|
||||
gcode.CodeDbOperationError,
|
||||
"%s, %s\n",
|
||||
"%s, %s",
|
||||
err.Error(),
|
||||
FormatSqlWithArgs(in.Sql, in.Args),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user