Skip to content

Conversation

@hawkaa
Copy link

@hawkaa hawkaa commented Feb 1, 2022

Implement RowsColumnTypeDatabaseTypeName interface in order to return
column types.

https://github.com/golang/go/blob/e22a14b7eb1e4a172d0c20d14a0d2433fdf20e5c/src/database/sql/driver/driver.go#L469-L477

@hawkaa
Copy link
Author

hawkaa commented Feb 1, 2022

@vegarsti FYI

@vegarsti
Copy link
Contributor

vegarsti commented Feb 1, 2022 via email

@alexbrainman
Copy link
Owner

@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

@hawkaa
Copy link
Author

hawkaa commented Mar 7, 2022

Hi @alexbrainman . I'm terribly sorry that this PR came out of nowhere. I created #174 and I hope that brings clarification.

Copy link
Owner

@alexbrainman alexbrainman left a 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

(*api.SQLLEN)(l))
}

// Column provides access to row columns.
Copy link
Owner

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.

// Column provides access to row columns.
type Column interface {
Name() string
DatabaseTypeName() string
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants