-
-
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
Sqlite support is broken in DNX #375
Comments
And in case you say the driver should add it, this issue explains the reason not to, as the driver can't guess what char was used in the query. |
Before I dig into this...are you saying it's broken only in DNX, and not on the full CLR? |
Right, the issue is that the Sqlite driver for DNX was expecting a parameter prefix ('@', '$', ':') because sqlite makes it mandatory. The other providers are more lose in this context. I got the EF team to fix it 10 minutes ago actually ;) by detecting when the name doesn't have a prefix and getting one from the query itself if there are no ambiguities. So it will be solved with next RC2 release. The issue in Dapper lays in the |
It is really hard to fix this in a clean way, especially since the metadata I don't like hard coding and special-casing connection types. It kinda Thoughts?
|
The other way of thinking about this is to rephrase it slightly: "sqlite
|
Feel free to close it as "by design" since the "Sqlite folks", a.k.a Entity Framework team, have implemented prefix inference in the driver since then. They agreed that it could just not hurt more to inject it if there were none. |
Ah, when you mentioned EF I pictured EF having the same problem when On Fri, 6 Nov 2015 13:12 Sébastien Ros [email protected] wrote:
|
This eliminates the dual solutions and brings Contrib into the project.json fold. - Tests are ported to xUnit though SQLite is disabled on DNX due to Issue #375 (Interop loads fail in the VS runner and params are busted regardless). - Projects are consolidated down to what's currently possible with project.json. - Contrib moved to: Dapper.Contrib and Dapper.Tests.Contrib (so tests appear at the end, no other reason vs. Dapper.Contrib.Tests) - EF moved to: Dapper.EntityFramework(.StrongName) - Rainbow moved to: Dapper.Rainbow - SqlBuilder moved to: Dapper.SqlBuilder - Packages are removed since it's not current-tooling friendly to keep them (nor was it using them). - xUnit implemented in Contrib via abstracts - this allow us to very quickly add any database provider to the rig in a very concise way. - Contrib unit tests fixed in various places - they were not parallel-runner friendly - Nuspecs removed, since they aren't used anymore (to eliminate confusion) - Removed speed tests for libraries that aren't on current versions of .Net (what would we be comparing?) - Perf tests moved to Dapper.Tests (consolidation from Dapper.DNX.Tests), but aren't activated yet (no define)
This eliminates the dual solutions and brings Contrib into the project.json fold. - Tests are ported to xUnit though SQLite is disabled on DNX due to Issue #375 (Interop loads fail in the VS runner and params are busted regardless). - Projects are consolidated down to what's currently possible with project.json. - Contrib moved to: Dapper.Contrib and Dapper.Tests.Contrib (so tests appear at the end, no other reason vs. Dapper.Contrib.Tests) - EF moved to: Dapper.EntityFramework(.StrongName) - Rainbow moved to: Dapper.Rainbow - SqlBuilder moved to: Dapper.SqlBuilder - Packages are removed since it's not current-tooling friendly to keep them (nor was it using them). - xUnit implemented in Contrib via abstracts - this allow us to very quickly add any database provider to the rig in a very concise way. - Contrib unit tests fixed in various places - they were not parallel-runner friendly - Nuspecs removed, since they aren't used anymore (to eliminate confusion) - Removed speed tests for libraries that aren't on current versions of .Net (what would we be comparing?) - Perf tests moved to Dapper.Tests (consolidation from Dapper.DNX.Tests), but aren't activated yet (no define)
@sebastienros this came up again today; any idea when the next public (nuget) drop of Microsoft.Data.SQLite can be expected (i.e. with the fix)? |
It has been fixed in the rc2 branch, in December. |
So to actually answer the question, it will ship when rc2 ships. Though it's already available in the rc2 feeds. |
Awesome; thanks for the update |
Parameter names are cleaned using this code:
Meaning if I specifically add an
@
in front on my parameter names, for instance in a dictionary, they are automatically removed. The issue is that it is provider specific thatDbParameter
should be called or not with a char prefix. For instance SqlServer is expecting@
in the name, but the provider will cope with it not being defined, the Sqlite one since DNX though will just pass whatever is set in theDbParameter
instance, and with the current code it fails as sqlite expects one (which can be$
,@
, and others).I'd suggest to remove this
Clean()
method altogether, or let adapters handle it.The text was updated successfully, but these errors were encountered: