-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Support $ as a parameter prefix #1952
Conversation
Does the existing pseudo-positional parameter support not work? By that I mean: looking at DuckDB, it seems to use positional rather than named parameters - and the where Name = ?name? which it rewrites as where Name = ? but uses the token |
Secondary: is there any integration test possible that would should this proposed change actually working against DuckDB? I don't know how DuckDB deploys in terms of whether it can work on the CI server, but something that can at least run on a dev box is desirable. |
This is not correct, the upcoming version of DuckDB (0.9.0, scheduled to be released in September) will support named parameters too. This PR added support for named parameters: Add support for named parameters in prepared statements As for how to run tests against DuckDB, DuckDB is an embedded database and you don't need to deploy anything. The simplest option is to clone the https://github.com/Giorgi/DuckDB.NET repo, checkout Named-Parameters branch and run Inside the
The changes in this PR make that assertion successful. |
Thanks for merging the PR. Do you want me to add test cases to Dapper that use DuckDB and test the new prefix? |
I already have a test case for it in my repo: Giorgi/DuckDB.NET@c5c2e5d |
Ideally "yes", but the real question is: how do we execute those tests? What is required to spin up a duckdb instance? Can it run in CI, or is it dev machine only? |
This PR adds support for $ as a parameter prefix. I made the changes as described in this comment: #1687 (comment)
I need support for $ because I'm building ADO.NET Provider for DuckDB and DuckDB uses $: Add support for named parameters in prepared statements