According to this thread, F# Core must be SQLCLR-approved for assemblies to be marked SAFE
. Is this planned? Can it even be done?
相关问题
- F#: Storing and mapping a list of functions
- Multiplying a list of tuples by a tuple in F#
- Multiplying a string in F#
- F# odd pattern matching issues
- Why doesn't bindingRedirect affect FSharp.Core
相关文章
- FSharp.Data.JsonProvider - Getting json from types
- Signing an F# Assembly (Strong name component)
- Learning F#: What books using other programming la
- fsc.exe is very slow because it tries to access cr
- Extension methods for specific generic types
- F# Object Initialization with a Constructor
- F# Lazy Evaluation vs Non-Lazy
- Pass table as parameter to SQLCLR TV-UDF
I believe it can be done. However, F# core library is the sole property of Microsoft. This means you can't modify its code and recompile it to match and comply with SQLCLR SAFE. I suggest you add suggestion to Microsoft using Microsoft's connect website.
Microsoft connect is at: http://connect.microsoft.com (you have to register and have email account on live.com or hotmail.com before register).
To manually add your .NET DLL and integrate it to SQL Server, you can do this:
In this example, the DLL from your F# code has to be compiled first. I take this step from MSDN Library link: http://msdn.microsoft.com/en-us/library/ms254956(v=vs.80).aspx
Just don't forget to add PERMISSION_SET = SAFE to the CREATE ASSEMBLY command.
Here are the steps I quote from above link:
Edit: based on the commenter below, he's right about F# is now open source! You can modify and recompile it to suit your needs.
Edit: adding more detail guide on how to integrate the DLL to SQL Server CLR integration.
A trick, as nasty as it is, would be using the --standalone flag of fsc (aka the F# compiler). This can even be added in the project settings and embeds in the output artifact the F# runtime library (along with all other dependencies deemed embeddable). I believe that at that point you should be able to do exactly what you want just by marking your assembly as SQLCLR safe.