Uh oh!
There was an error while loading. Please reload this page.
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 |
mgravell
commented
Aug 23, 2023
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. |
Giorgi
commented
Aug 23, 2023
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. |
Giorgi
commented
Oct 2, 2023
Thanks for merging the PR. Do you want me to add test cases to Dapper that use DuckDB and test the new prefix? |
Giorgi
commented
Oct 2, 2023
I already have a test case for it in my repo: Giorgi/DuckDB.NET@c5c2e5d |
mgravell
commented
Oct 2, 2023
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