generated from grafana/grafana-starter-datasource-backend
-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
Description
What happened:
The column type "Array(Nullable(String))" is not tested in either pkg/converters/converters_test.go or pkg/plugin/driver_test.go. I made one test case in file pkg/plugin/driver_test.go on my local then sometimes I found the error below on line 280.
sql: Scan error on column index 0, name "col1": unsupported Scan, storing driver.Value type []*string into type *string
The function I wrote looks like this
func TestArrayNullableString(t *testing.T) {
for name, protocol := range Protocols {
t.Run(fmt.Sprintf("using %s", name), func(t *testing.T) {
var val []*string
conn, close := setupTest(t, "col1 Array(Nullable(String))", protocol, nil)
defer close(t)
v := "48"
val = append(val, &v, nil)
insertData(t, conn, val)
checkRows(t, conn, 1, val)
})
}
}
What you expected to happen:
Expecting no error while using the plugin with the column type "Array(Nullable(String))"
How to reproduce it (as minimally and precisely as possible):
Screenshots
Anything else we need to know?:
This error does not always appear.
Environment:
- Grafana version:
- Plugin version: v4.0.3
- OS Grafana is installed on:
- User OS & Browser: Linux mint 21.3
- Others:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done