Skip to content
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

Add support for duckdb #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

danielhep
Copy link

@danielhep danielhep commented Sep 12, 2024

DuckDB has a unique way of formatting arguments that requires the type be specified after a ?:: for positional arguments.

I added support for my own use case and it seems to work well.

DuckDB documentation: https://duckdb.org/docs/api/nodejs/overview

@blakeembrey
Copy link
Owner

I like the PR, but I think it's probably better to keep this in user land for now until there's a solid proposal that works with the existing methods and across drivers.

FWIW Postgres also uses the same syntax, but also infers the types in the driver itself. For now you can write ${value}::INTEGER.

Does duckdb always require the type in the SQL statement or does it also have a way that it automatically infers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants