JordanMarr / SqlHydra

SqlHydra is a suite of NuGet packages for working with databases in F# including code generation tools and query expressions.
MIT License
212 stars 20 forks source link

Allow comparisons with the column on the right #49

Closed ntwilson closed 1 year ago

ntwilson commented 1 year ago

I was looking at this code while working on something else, and saw an opportunity to address a slight nuisance that I ran into before, so I decided to create a PR for it. Feel free to just close this if it's not a direction you want to go, since I didn't create an issue or any discussion around this before making the PR.

Currently, if you write a query where (5 <= row.x && row.x < 10), it will compile but crash with a "not implemented" exception at runtime. This PR adds the ability to put a value on the left and the column on the right in a WHERE comparison.

JordanMarr commented 1 year ago

This is something I've thought about doing. I can't remember if there was a reason I didn't. 🤔 I will merge it if all the tests pass.

Thanks!

JordanMarr commented 1 year ago

All tests pass. This is a fantastic improvement. Thanks!

JordanMarr commented 1 year ago

https://github.com/JordanMarr/SqlHydra/releases/tag/query-v1.1.2