-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DuckDB v1.2.0 and removing any duckdb.h dependencies #364
Conversation
Hi Marc! Thanks for the detailed review! I am working on implementing your suggestions. I'll move some things into separate PRs and merge them (like the Go version and the mappings) so we can further decrease the scope of this one. |
# Conflicts: # .github/workflows/tests.yaml # go.mod # mapping/go.mod # mapping/mapping.go # mapping/mapping_darwin_amd64.go # mapping/mapping_darwin_arm64.go # mapping/mapping_linux_amd64.go # mapping/mapping_linux_arm64.go # mapping/mapping_windows_amd64.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcboeker @JAicewizard, I can review this now. It loads slowly, but all the files and changes are there. Does it work better for you, now, too? I tried Brave and Safari.
types.go
Outdated
lower: C.uint64_t(r.Uint64()), | ||
upper: C.int64_t(q.Int64()), | ||
}, nil | ||
var hugeInt m.HugeInt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the bindings module only exposes Get
and Set
for each field individually. Should we add New...
methods to the bindings module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly small nits, looks really good!
import ( | ||
"database/sql/driver" | ||
"errors" | ||
"unsafe" | ||
|
||
"github.com/marcboeker/go-duckdb/mapping" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, but reading mapping.XXX
is like 1% confusing everytime I read it. Maybe make this a named import and call it duckdb
(or ddb
to avoid confusion with this package)? not sure what others think of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pinging @marcboeker about this. I don't have a strong opinion about the name, so I would choose whatever you (two) prefer. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about api
as it was before, but now in its own package instead of the duckdb
package? Or mapper
? @JAicewizard what confuses you about mapping
? That it is too generic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah mapping is too generic, arrowmapping
is an example that better IMO since it clearly states that it is for arrow.
@taniabogatsch Maybe we can change the module to include to a |
@marcboeker, that sounds good. I'll finish this up, merge it into the Nit: Could you clean up the branches (I don't have permission to delete a branch, not even my own, haha)? There are quite a few stale ones, which might be confusing.
|
The changes in this PR can now be used/tried out via |
Nice work! Must have been a pain to work on this |
this is wonderful news! =) looking forward to updating! |
Breaking changes
This PR significantly changes go-duckdb's internals and causes a few breaking changes, as outlined above.
Any
C.duckdb...
call has been moved to call into https://github.com/duckdb/duckdb-go-bindings.Open ToDo's
Arrow
opt-in.mapping.go
for each pre-built combination.README
Future Work
"C"
.Related Issues / Discussions