Zaid-Ajaj / Npgsql.FSharp.Analyzer

F# analyzer that provides embedded SQL syntax analysis, type-checking for parameters and result sets and nullable column detection when writing queries using Npgsql.FSharp.
MIT License
137 stars 9 forks source link

Lookup columns where the type is an enum array #25

Closed francesconi closed 3 years ago

francesconi commented 3 years ago

That this PR closes #21 isn't entirely true. It prevents the analyzer from stopping to work whereas there needs to be done some more changes in order to handle enum types, not just enum arrays. Please correct me if I'm wrong. Does it make sense to you to rename this issue then close it and create a new one for enums?

francesconi commented 3 years ago

ping

Zaid-Ajaj commented 3 years ago

Hi there @francesconi sorry for the delayed reply I have been really busy lately, I will be looking into the issue shortly. The PR looks good for now. I will merge and publish asap when time permits. Again sorry for the delay and thanks for the PR

Zaid-Ajaj commented 3 years ago

Hello @francesconi, your PR merged and published as of v3.22.1 and should be available everywhere (nuget for vs code analyzers, vs extension or CLI tool via Ubik)

there needs to be done some more changes in order to handle enum types, not just enum arrays

I am not sure we can do a lot about enums. Just like any custom types such as ltree, the way to work with them is cast them to something understandable by the analyzer (for example to string using ::text) and work from there. If you have any ideas about improving the static analysis, please open an issue to discuss 😄

francesconi commented 3 years ago

Perfect, thank you! 🚀