|
|
|
|
|
by qxmat
1435 days ago
|
|
I did the same a while back. I used ANTLR4 to generate a .NET tree walker that would build up an IQueryProvider expression. IQueryProvider would then compile to Expression<T> and self-optimise (simplifying boolean algebra and removing redundant expressions). We hooked this up to npgsql and viola - a sane, typesafe, query string DSL without a single line of SQL. Nowadays I hack together Terraform and Python ML- I miss .NET dearly... it was a simpler time. |
|