New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQL Support For C# Statements #2

Closed
andrejohansson opened this Issue Apr 6, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@andrejohansson

andrejohansson commented Apr 6, 2018

Hello, thanks for your work on this!

Would it be possible to add support of executing sql queries against a collection from c#?

Something like:

MyCollection.Query("SELECT x FROM x WHERE...").Take(10).Dump();
MyCollection.Query("SELECT x FROM x WHERE...").Cast<MyType>().Single(i => i.Prop == "something");

This would give us the ability to initiate queries with sql to do the heavy lifting and then narrow down the results and transition to c#/linq.

I know about the support for SQL today but I cant really use the results there in further code fiddling. :-)

@conwid

This comment has been minimized.

Owner

conwid commented Apr 6, 2018

Sure, thanks for the suggestion.
I'll leave it here for a while so if someone wants to join, we can spec the feature and implement it.

I would think that the method Query in your description should be named ExecuteSql. I envision a generic version (so no need to specify an extra cast) and a non-generic version that relies heavily on dynamics.

The query itself is executed of course on the server side, and then everything else is basically Linq to Objects queries on the result.

@conwid conwid removed the up for grabs label Apr 7, 2018

@conwid conwid self-assigned this Apr 7, 2018

@conwid

This comment has been minimized.

Owner

conwid commented May 4, 2018

I'm happy to report that I have made progress with this request. You can already check out the source code in the repo (and even download the driver's current version if you look really closely), but I still need some time to hammer out some details.

I suggest to check this repository, my Github account and my blog (dotnetfalcon.com) during the upcoming week as I'm planning on releasing everything then.

@conwid conwid closed this May 12, 2018

@andrejohansson

This comment has been minimized.

andrejohansson commented May 15, 2018

Nice! But I think your links to the binaries (both from the blog and in the readme) are broken?

@conwid

This comment has been minimized.

Owner

conwid commented May 15, 2018

Thanks for spotting this. Actually, the links were OK, the problem was that I forgot to set the access policy on the blob. Fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment