tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
159 stars 23 forks source link

SQL driver ScanType() returns empty interface #108

Open clarkmcc opened 3 months ago

clarkmcc commented 3 months ago

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?