go-mocket icon indicating copy to clipboard operation
go-mocket copied to clipboard

ColumnTypes() seems to not be supported with v1.0.7

Open z4ce opened this issue 4 years ago • 0 comments

When calling ColumnTypes on a rows object, I get:

panic: runtime error: index out of range [0] with length 0 [recovered]
        panic: runtime error: index out of range [0] with length 0

goroutine 67 [running]:
testing.tRunner.func1.1(0x1ba1bc0, 0xc00078d240)
        /usr/local/Cellar/go/1.14/libexec/src/testing/testing.go:941 +0x3d0
testing.tRunner.func1(0xc000902480)
        /usr/local/Cellar/go/1.14/libexec/src/testing/testing.go:944 +0x3f9
panic(0x1ba1bc0, 0xc00078d240)
        /usr/local/Cellar/go/1.14/libexec/src/runtime/panic.go:967 +0x15d
github.com/Selvatico/go-mocket.(*RowsCursor).ColumnTypeScanType(0xc000910180, 0x0, 0xc000910180, 0xa60b848)
        /Users/ianzink/go/pkg/mod/github.com/!selvatico/[email protected]/rows.go:51 +0x8d
database/sql.rowsColumnInfoSetupConnLocked(0x1fb79e0, 0xc000910180, 0xc000455d08, 0x128efa7, 0x1fb31a0)
        /usr/local/Cellar/go/1.14/libexec/src/database/sql/sql.go:2944 +0x135
database/sql.(*Rows).ColumnTypes(0xc000910200, 0x0, 0x0, 0x0, 0x0, 0x0)
        /usr/local/Cellar/go/1.14/libexec/src/database/sql/sql.go:2872 +0x1ba

z4ce avatar Mar 25 '20 16:03 z4ce