Skip to content

Commit

Permalink
Merge branch 'denisenkom-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
shueybubbles committed May 19, 2022
2 parents 39b1cff + d39ea71 commit f21bac1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ func (e Error) Error() string {
return "mssql: " + e.Message
}

func (e Error) String() string {
return e.Message
}

// SQLErrorNumber returns the SQL Server error number.
func (e Error) SQLErrorNumber() int32 {
return e.Number
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/microsoft/go-mssqldb

go 1.11
go 1.13

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe
github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188
github.com/golang-sql/sqlexp v0.1.0
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZ
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4=
github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8=
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
Expand Down
4 changes: 2 additions & 2 deletions queries_go19_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1126,12 +1126,12 @@ func TestMessageQueue(t *testing.T) {
active := true

msgs := []interface{}{
sqlexp.MsgNotice{Message: "msg1"},
sqlexp.MsgNotice{Message: Error{Message: "msg1"}},
sqlexp.MsgNextResultSet{},
sqlexp.MsgNext{},
sqlexp.MsgRowsAffected{Count: 1},
sqlexp.MsgNextResultSet{},
sqlexp.MsgNotice{Message: "msg2"},
sqlexp.MsgNotice{Message: Error{Message: "msg2"}},
sqlexp.MsgNextResultSet{},
sqlexp.MsgNextResultSet{},
}
Expand Down
2 changes: 1 addition & 1 deletion token.go
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ func processSingleResponse(ctx context.Context, sess *tdsSession, ch chan tokenS
sess.logger.Log(ctx, msdsn.LogMessages, info.Message)
}
if outs.msgq != nil {
_ = sqlexp.ReturnMessageEnqueue(ctx, outs.msgq, sqlexp.MsgNotice{Message: info.Message})
_ = sqlexp.ReturnMessageEnqueue(ctx, outs.msgq, sqlexp.MsgNotice{Message: info})
}
case tokenReturnValue:
nv := parseReturnValue(sess.buf)
Expand Down

0 comments on commit f21bac1

Please sign in to comment.