Comments (10)
I've been experimenting with converting to set fmtonly on
and it seems hard to get this to work without knowing the types of the parameters. I get all sorts of errors. Maybe this isn't possible after all... I'll think about it some more.
from fsharp.data.sqlclient.
I got the same impression trying combination of general ADO.NET schema collections and ExecuteReader with CommandBehaviour.SchemaOnly.
from fsharp.data.sqlclient.
It is not an easy problem. The possible types that would satisfy running the query with SchemaOnly are few, however. Seeing as it is only compile time, maybe it would be possible to try some known variants before failing out?
Think about a query like this:
select top (@top)
from tbl t
where t.ColName = @param
Given that we know the name of each param, but not the type, We could try sending int for @top
, parse the error, then try ''
, parse the error again. If the error now says @param is wrong, then do the same for that. 0
works for numerics, ''
works for strings, dates. With those two, most types are covered. We can add more as we see the need.
It would be awesome to remove the temp table restriction..
from fsharp.data.sqlclient.
I'm afraid that we'll end up writing some sort of SQL parser. I would rather provide solution that works well under certain limitations that something that "kinda works" but has wider applicability. Anyway, I'll keep thinking about it. We can save it version or 1.5 or 2.0.
from fsharp.data.sqlclient.
I agree with @dmitry-a-morozov, writing sql parser is way over our original intent.
from fsharp.data.sqlclient.
I'm on the same page. I agree to keep it open though.
On Oct 27, 2013 11:49 PM, "dsevastianov" [email protected] wrote:
I agree with @dmitry-a-morozov https://github.com/dmitry-a-morozov,
writing sql parser is way over our original intent.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-27181683
.
from fsharp.data.sqlclient.
This can be closed?
from fsharp.data.sqlclient.
I'd like to play with this first, right now minimal version is 12. We should have partial supporting I think.
from fsharp.data.sqlclient.
My guess is that Sql 2014 will have better support, and the importance of this will diminish in time.
Attempting this might prove to be sisyfosian. :)
from fsharp.data.sqlclient.
I guess you're right, closing
from fsharp.data.sqlclient.
Related Issues (20)
- Dacpac support info HOT 3
- "F# Formatting" link is broken
- Can't build/run from the commandline, but can from Visual Studio 2019 HOT 2
- Question: Creating a provider without an access to DB HOT 3
- SqlEnumProvider breaks VS 2019 HOT 2
- Not platform detection Fable HOT 1
- Build is broken without full VS installation
- Fixed length binary columns in user defined table types fail when constructed HOT 8
- Cannot use User Defined Table Types with the SqlCommandProvider HOT 5
- .NET 6 support HOT 6
- One line summary of the bug HOT 2
- TVP Column Ordering is incorrect as of version 2.1.0
- Cannot use parameter name more than once in a script HOT 3
- System.Data.SqlClient is not supported on this platform. HOT 5
- Conversion failed when using User Defined Table Types HOT 1
- Any 2023 tricks for running on Windows? HOT 3
- NullReferenceException in SqlConnection.UseLocally HOT 1
- Support for 'Active Directory Interactive' authentication HOT 3
- dotnet SDK projects using FSharp.Core version 7.0.0 breaks at runtime HOT 3
- SQL LIKE operation doesn't recognize variable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.data.sqlclient.