Skip to content

Commit

Permalink
improve error message for package gdb
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed May 19, 2022
1 parent 24f5b27 commit 7753fc6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions database/gdb/gdb_core_underlying.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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),
)
Expand Down

0 comments on commit 7753fc6

Please sign in to comment.