DotNet.Glob icon indicating copy to clipboard operation
DotNet.Glob copied to clipboard

Bring dotnet glob to sql clr and ef core!

Open dazinator opened this issue 4 years ago • 2 comments

I'm considering the following..

Produce a SQL Clr assembly that can be installed into sql server and adds a User defined function for glob matching which will leverage dotnet glob.

Produce an EFCore assembly that provides the User defined function for use with EFCore db context queries.

See this for how to use user defined functions in ef core: http://anthonygiretti.com/2018/01/11/entity-framework-core-2-scalar-function-mapping/

With this in place, in an application that uses EFCore, you could query a SQL database and use Glob pattern matching inside the query that executes on the sql server. You can already use Like operator ofcourse, but Glob expressions have the potential to be better suited for matching paths if you store directory paths in a database for example.

dazinator avatar Aug 10 '19 21:08 dazinator

I'm going to wait to implement this only if there is demand.

dazinator avatar Jan 20 '20 17:01 dazinator

This looks like the new hotness

https://github.com/microsoft/sql-server-language-extensions/tree/main/language-extensions/dotnet-core-CSharp

dazinator avatar Sep 10 '21 07:09 dazinator