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

Implement the ability to disable analysis #10

Closed Zaid-Ajaj closed 4 years ago

Zaid-Ajaj commented 4 years ago

Sometimes when using temporary tables from different queries, the analyzer will not be able to say that a query is correct because it doesn't know that during runtime, the query will execute correctly. There should be a way to disable or ignore analysis results when they don't make sense or are wrong until they are fixes.

I am thinking that we could add a function like Sql.skipAnalysis which the user can add to the SQL operation block:

connectionString
|> Sql.connect 
|> Sql.skipAnalysis
|> Sql.query "SELECT * FROM users"
|> Sql.execute (fun read -> read.text "username")
Zaid-Ajaj commented 4 years ago

Fixed as of v3.13.0 :rocket: