-
Notifications
You must be signed in to change notification settings - Fork 147
column database type names #114
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
base: master
Are you sure you want to change the base?
Conversation
Why do you need this function? How it is helpful to you? Who will maintain this function in the future? Imagine that I tomorrow I will add more column types. Thank you. Alex |
Programmers, who need usage sql.Column.DatabaseTypeName() method of sql.Column interface.
I can see, what type of value is in []byte slice. By example, SQL_C_CHAR or SQL_C_WCHAR. I can convert it from and to local language codepage or utf8.
This types defined in ODBC. If you add new type tomorrow, you must add string representation, in all cases (by example if you switch from int codes of types to interface with String() and Code() methods). |
Thank you for explaining. I don't see your changes useful to me. The change looks just like an extra code that I have to maintain for no benefit to me. I will not merge your change. I suggest you keep this code in your version of this package. Sorry. Alex |
I'm a plus one on wanting this implemented. However I don't think this actually goes far enough. For our use case I need most of the additional
I am happy to put a PR in for this. However, I wanted to test the water first @alexbrainman as you seem like you don't want to maintain a solution for this. I'll outline my case and you can decide if you think the PR is warranted. The main reason for adding this functionality is for use with func rowsColumnInfoSetupConnLocked(rowsi driver.Rows) []*ColumnType {
...
if prop, ok := rowsi.(driver.RowsColumnTypeScanType); ok {
ci.scanType = prop.ColumnTypeScanType(i)
}
...
} We need Let me know thoughts, I understand your hesitation to not maintain. |
Sorry for pushing this back. But I have no free time to maintain more changes in this repo. You would have to fork this package and make changes there. Alex |
Ok no problems. Thanks for the response. |
return ODBC typename for columns in sql.Column.DatabaseTypeName()