You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Snip...[for r in db.Procedures.test.Invoke(None).ResultSet
-> r.MapTo<TestResult>()]//Error: Expression was expected to have type int but here has type Option<int>
You can't do this as the F# type system doesn't allow you to represent null as int. In cases like this I guess we could detect if the parameter is nullable (presuming the metadata is available) then the type of the parameter would be Nullable<int> which I think would cover your needs, or if PreferOptionals is set you would get Option<int>
yes this should be pretty easy to do, we will get it in for the coming V1. It might be nice to put sprocs under their schemas as well, on an unrelated note. They can clash with each other at the moment.
yes this should be pretty easy to do, we will get it in for the coming V1.
It might be nice to put sprocs under their schemas as well, on an unrelated
note. They can clash with each other at the moment.
—
Reply to this email directly or view it on GitHub #158 (comment)
.
additionally, it might not be possible but if you set the stored procedure to have Null as a default parameter, and you pass null into the sproc, it will send 'default' to the sql, which uses the default value and all is ok
Activity
colinbull commentedon Sep 18, 2015
You can't do this as the F# type system doesn't allow you to represent null as int. In cases like this I guess we could detect if the parameter is nullable (presuming the metadata is available) then the type of the parameter would be
Nullable<int>
which I think would cover your needs, or ifPreferOptionals
is set you would getOption<int>
pezipink commentedon Sep 18, 2015
yes this should be pretty easy to do, we will get it in for the coming V1. It might be nice to put sprocs under their schemas as well, on an unrelated note. They can clash with each other at the moment.
legomind commentedon Sep 18, 2015
Cool. Looking forward to v1
On Fri, Sep 18, 2015, 5:00 AM Ross McKinlay notifications@github.com
wrote:
ghost commentedon Nov 21, 2015
additionally, it might not be possible but if you set the stored procedure to have Null as a default parameter, and you pass null into the sproc, it will send 'default' to the sql, which uses the default value and all is ok
JamesFaix commentedon Jul 11, 2019
Any updates on this?