Skip to content
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

SQL driver ScanType() returns empty interface #108

Open
clarkmcc opened this issue Mar 13, 2024 · 0 comments
Open

SQL driver ScanType() returns empty interface #108

clarkmcc opened this issue Mar 13, 2024 · 0 comments

Comments

@clarkmcc
Copy link

When I run the following code, the ScanType() always returns an empty interface

rows, err := db.QueryContext(ctx, query)
if err != nil {
	return nil, err
}
types, err := rows.ColumnTypes()
if err != nil {
	return nil, err
}
types[0].ScanType() // interface{}

Go doc says

// ScanType returns a Go type suitable for scanning into using [Rows.Scan].
// If a driver does not support this property ScanType will return
// the type of an empty interface.
func (ci *ColumnType) ScanType() reflect.Type

which would indicate that maybe this library doesn't support this functionality. Can it be supported?

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

No branches or pull requests

1 participant