marcboeker / go-duckdb

go-duckdb provides a database/sql driver for the DuckDB database engine.
MIT License
623 stars 97 forks source link

Bump Go version, unify errors and other refactoring #187

Closed taniabogatsch closed 5 months ago

taniabogatsch commented 5 months ago

New error functions

This PR adds a new file, errors.go, which unifies driver error messages by introducing two new functions: getError and getDuckDBError. For now, I've only used the new error functions in duckdb.go, but if this is a sensible proposal, I'll open more PRs to unify errors throughout the driver.

Other changes

@marcboeker, let me know what you think. :)

taniabogatsch commented 5 months ago

It looks like our freebsd tests cannot be compiled to 1.22, so I'll revert back to 1.21.

  gmake test
  /usr/bin/bash /home/runner/work/_actions/vmactions/freebsd-vm/v1/run.sh execSSHSH
  Config file: freebsd-14.0.conf
  go test -v -race -count=1 .
  go: downloading github.com/apache/arrow/go/v14 v14.0.2
...
  go: downloading github.com/klauspost/cpuid/v2 v2.2.5
  github.com/marcboeker/go-duckdb: cannot compile Go 1.22 code
  FAIL  github.com/marcboeker/go-duckdb [build failed]
  FAIL
  gmake: *** [Makefile:14: test] Error 1
marcboeker commented 5 months ago

Thanks for the modifications.