Closed Vignesh2308m closed 1 month ago
I would suggest to always check returning errors.
The line a.AppendRow(1, "apple")
states that it cannot cast int
to int32
. Defining a column as INTEGER
means it is a int32
in Go. But you are passing an int
(which is the default for any unspecified integer in Go) to the appender.
When casting it to int32
beforehand, the append works:
if err := a.AppendRow(int32(1), "apple"); err != nil {
// Handle error
}
I'm using go-duckdb for one of my personal project all dependencies are fine but when i run sample code for appending to table it's not giving me the result. `package main
import ( "context" "database/sql" "fmt"
)
func main() {
}`
The result was, id: 0 name:
my go version is 1.22.5