Comments (9)
SPs are loaded lazily, so it won't help performance. As for the Stored Procedures, we are trying to mimic SSMS experience for the user, but maybe you're right, it's not necessarily very useful.
from fsharp.data.sqlclient.
@vasily-kirichenko I think we'll keep Stored Procedures
for now mostly because there is value in using widely accepted terms. You alleviate the issue by using local alias:
let procedures = myDb.``Stored Procedures``.
procedures.``dbo.MyProc``.AsyncExecute()
We'll work on performance/responsiveness improvements.
Question: would you mind if we'll remove SP support from SqlCommandProvider? I mean we'll remove CommandType parameter. So stored procedures can be called only via EXEC.
Also, what do you think about packaging? Should both type providers be in one project/nuget package? Or separate ones?
from fsharp.data.sqlclient.
I agree with removing CommandType
parameter from SqlCommand
TP.
What about packaging, I think it's ok to put both the TPs into a single package, since it's quite common to use some ad-hoc queries along with SPs (at least in my daily job).
Parameters/result type inference in SqlProgrammability
is awesome (so far). However, it's uncovered another problem - it's very easy to get lost in big tuples, where we don't have result column names, like this:
sp.AsyncExecute(@LastDayCount: int, @MD5: byte []) : Async<Collections.Generic.IEnumerable<string * DateTime * bool * Option<string> * Option<string> * string * Option<DateTime> * Option<string> * Option<int> * int * Option<byte> * byte>>
As a result, I have to go to the Sql Server Management Studio to consult what all this mean. Is it possible to return records instead?
from fsharp.data.sqlclient.
@vasily-kirichenko You can use ResultType.Records instead of default ResultType.Tuples.
from fsharp.data.sqlclient.
How about switching default to Records?
from fsharp.data.sqlclient.
With ResultType=ResultType.Records
the TP is fantastic! :) It inferences literally everything. Cool.
I agree with switching to Records as default result type, great idea.
from fsharp.data.sqlclient.
However, I think it's better to generate string option
for all string parameters (varchar, nvarchar, text...) instead of string
. Here we have inconsistence between strings and all other types, i.e.:
DB int <=> int option
DB tinyint <=> byte option
but
DB nvarchar <=> string
from fsharp.data.sqlclient.
I'm not sure about that. string
is reference type, not struct. I think this behavior is well-aligned with what is commonly expected.
from fsharp.data.sqlclient.
Default result type for SqlProgrammability switched to Records
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.