-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement RowsColumnTypeDatabaseTypeName #171
base: master
Are you sure you want to change the base?
Implement RowsColumnTypeDatabaseTypeName #171
Conversation
Implement RowsColumnTypeDatabaseTypeName interface in order to return column types. https://github.com/golang/go/blob/e22a14b7eb1e4a172d0c20d14a0d2433fdf20e5c/src/database/sql/driver/driver.go#L469-L477
@vegarsti FYI |
Nice!
…On Tue, 1 Feb 2022 at 21:26, Håkon Åmdal ***@***.***> wrote:
@vegarsti <https://github.com/vegarsti> FYI
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLPSNPF4YC2PCYFIWFUPVLUZA6YVANCNFSM5NKF32AQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@hawkaa thanks for sending this PR. But what is the problem that this change solves? It would be nice if you create an issue first describing the problem, and then we can decide if your change is good solution to your problem. Thank you. Alex |
Hi @alexbrainman . I'm terribly sorry that this PR came out of nowhere. I created #174 and I hope that brings clarification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR.
Please, see my comments.
Alex
@@ -35,6 +35,7 @@ func (l *BufferLen) Bind(h api.SQLHSTMT, idx int, ctype api.SQLSMALLINT, buf []b | |||
// Column provides access to row columns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
Fixes #174
to the end of your commit message. So future code readers can determine why we made that change.
@@ -35,6 +35,7 @@ func (l *BufferLen) Bind(h api.SQLHSTMT, idx int, ctype api.SQLSMALLINT, buf []b | |||
// Column provides access to row columns. | |||
type Column interface { | |||
Name() string | |||
DatabaseTypeName() string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes require a new test in mssql_test.go
that demonstrates / verifies new functionality. Otherwise it is impossible for me to judge if new coded works or not.
If you don't have MS SQL Server to test with, see Makefile with instructions on how to run MS SQL Server in Docker on Linux.
Implement RowsColumnTypeDatabaseTypeName interface in order to return
column types.
https://github.com/golang/go/blob/e22a14b7eb1e4a172d0c20d14a0d2433fdf20e5c/src/database/sql/driver/driver.go#L469-L477