Npgsql.FSharp.Analyzer icon indicating copy to clipboard operation
Npgsql.FSharp.Analyzer copied to clipboard

Support for `distinct` in functions and `between`

Open sebastian opened this issue 4 years ago • 4 comments

Dear @Zaid-Ajaj, thank you for all the wonderful work you are doing for the open-source community!

I am considering using the SQL parser part of your library in a reference implementation I am building. Currently, it is missing two features I would rely on, namely:

  • the ability to use the distinct keyword in a function (such as count(distinct column), and
  • the BETWEEN keyword for WHERE-clauses (WHERE age BETWEEN 1 and 20)

Would you welcome pull-requests to add these features?

If yes, are there any particular things I should keep in mind while adding these features? Say some non-obvious aspect of your library that doesn't immediately spring to mind but needs to be considered?

sebastian avatar Jan 13 '21 11:01 sebastian

Hi there @sebastian, sorry for the late reply. It has been a busy and hectic start of a year 😅

thank you for all the wonderful work you are doing for the open-source community!

My pleasure 😄 I really appreciate the support ❤️ 🙏

Would you welcome pull-requests to add these features?

PRs are always welcome! I can't think of anything special to consider, really. I think only the fact that the parser as a standalone thing needs to be published separately which is something I have to do at some point. Additions to the parser would be great as long as the tests keep passing 😉

Zaid-Ajaj avatar Feb 09 '21 09:02 Zaid-Ajaj

Absolutely no problems with the late reply. I imagined you had plenty to do. We have since made our own parser instead, but I'll try to extend your parser too when time allows. Can't promise when that will be though.

sebastian avatar Feb 09 '21 09:02 sebastian

We have since made our own parser instead, but I'll try to extend your parser too when time allows.

Glad you have found a workaround. It might be for the better because this parser really is extremely limited and works only in combination with metadata from the database.

Can't promise when that will be though.

Don't worry about it at all, if you don't need it now then just forget about 😉 if you still want the parser as a standalone library, ping me here and I will publish it 😄

Zaid-Ajaj avatar Feb 09 '21 09:02 Zaid-Ajaj

Then I'll forget about it for now, and look for time to make some more meaningful contribution in some other projects of yours down the line instead.

sebastian avatar Feb 09 '21 09:02 sebastian