From 8d5412fe3dd28abc45fb45a7d97134d09ec1ce82 Mon Sep 17 00:00:00 2001 From: Zaid Date: Sun, 6 Dec 2020 01:42:10 +0100 Subject: [PATCH] Npgsql.FSharp.Analyzer v3.17 support datetimeOffset and datetimeOffsetOrNone when reading columns --- RELEASE_NOTES.md | 3 +++ src/FParsec/AssemblyInfo.fs | 16 ++++++++-------- src/FParsecCS/Cloning.cs | 3 --- src/NpgsqlFSharpAnalyzer.Core/AssemblyInfo.fs | 16 ++++++++-------- src/NpgsqlFSharpAnalyzer.Core/SqlAnalysis.fs | 10 +++++----- .../SyntacticAnalysis.fs | 2 ++ src/NpgsqlFSharpAnalyzer/AssemblyInfo.fs | 16 ++++++++-------- src/NpgsqlFSharpParser/AssemblyInfo.fs | 16 ++++++++-------- src/NpgsqlFSharpVs/source.extension.vsixmanifest | 2 +- tests/NpgsqlFSharpAnalyzer.Tests/AssemblyInfo.fs | 16 ++++++++-------- tests/examples/hashing/AssemblyInfo.fs | 16 ++++++++-------- 11 files changed, 59 insertions(+), 57 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f1c4d9f..46a7474 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +### 3.17.0 - 2020-09-15 +* Support for datetimeOffset and datetimeOffsetOrNone when reading columns of type timestamptz + ### 3.16.0 - 2020-09-15 * Analyze top level do expressions diff --git a/src/FParsec/AssemblyInfo.fs b/src/FParsec/AssemblyInfo.fs index 7c0b362..a687815 100644 --- a/src/FParsec/AssemblyInfo.fs +++ b/src/FParsec/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FParsec" let [] AssemblyProduct = "NpgsqlFSharpAnalyzer" - let [] AssemblyVersion = "3.16.0" + let [] AssemblyVersion = "3.17.0" let [] AssemblyMetadata_ReleaseDate = "2020-09-15T00:00:00.0000000" - let [] AssemblyFileVersion = "3.16.0" - let [] AssemblyInformationalVersion = "3.16.0" + let [] AssemblyFileVersion = "3.17.0" + let [] AssemblyInformationalVersion = "3.17.0" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "9ada11966d9a0a63829dd0976addedf8d6224a15" + let [] AssemblyMetadata_GitHash = "985f38c696391f5c8f38f4498e3a59db66ffe3c6" diff --git a/src/FParsecCS/Cloning.cs b/src/FParsecCS/Cloning.cs index f0a0717..a4e240f 100644 --- a/src/FParsecCS/Cloning.cs +++ b/src/FParsecCS/Cloning.cs @@ -1,9 +1,6 @@ // Copyright (c) Stephan Tolksdorf 2010-2011 // License: Simplified BSD License. See accompanying documentation. -using System.Reflection; -using System.Reflection.Emit; - #if !LOW_TRUST using System; diff --git a/src/NpgsqlFSharpAnalyzer.Core/AssemblyInfo.fs b/src/NpgsqlFSharpAnalyzer.Core/AssemblyInfo.fs index b8b10da..c7f7628 100644 --- a/src/NpgsqlFSharpAnalyzer.Core/AssemblyInfo.fs +++ b/src/NpgsqlFSharpAnalyzer.Core/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "NpgsqlFSharpAnalyzer.Core" let [] AssemblyProduct = "NpgsqlFSharpAnalyzer" - let [] AssemblyVersion = "3.16.0" + let [] AssemblyVersion = "3.17.0" let [] AssemblyMetadata_ReleaseDate = "2020-09-15T00:00:00.0000000" - let [] AssemblyFileVersion = "3.16.0" - let [] AssemblyInformationalVersion = "3.16.0" + let [] AssemblyFileVersion = "3.17.0" + let [] AssemblyInformationalVersion = "3.17.0" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "9ada11966d9a0a63829dd0976addedf8d6224a15" + let [] AssemblyMetadata_GitHash = "985f38c696391f5c8f38f4498e3a59db66ffe3c6" diff --git a/src/NpgsqlFSharpAnalyzer.Core/SqlAnalysis.fs b/src/NpgsqlFSharpAnalyzer.Core/SqlAnalysis.fs index 16a1e95..d3718bc 100644 --- a/src/NpgsqlFSharpAnalyzer.Core/SqlAnalysis.fs +++ b/src/NpgsqlFSharpAnalyzer.Core/SqlAnalysis.fs @@ -875,15 +875,15 @@ module SqlAnalysis = else () | ("timestamptz"|"timestamp with time zone") -> - if column.Nullable && notUsing "timestamptzOrNone" && notUsing "dateTimeOrNone" - then yield typeMismatch [ replace "dateTimeOrNone"; replace "timestamptzOrNone" ] + if column.Nullable && notUsing "timestamptzOrNone" && notUsing "dateTimeOrNone" && notUsing "datetimeOffsetOrNone" + then yield typeMismatch [ replace "datetimeOffsetOrNone"; replace "dateTimeOrNone"; replace "timestamptzOrNone" ] //else if not column.Nullable && (using "timestamptzOrNone" || using "dateTimeOrNone") //then yield typeMismatch [ replace "dateTime"; replace "timestamptz" ] - else if notUsing "timestamptzOrNone" && notUsing "timestamptz" && notUsing "dateTimeOrNone" && notUsing "dateTime" + else if notUsing "timestamptzOrNone" && notUsing "timestamptz" && notUsing "dateTimeOrNone" && notUsing "dateTime" && notUsing "datetimeOffsetOrNone" && notUsing "datetimeOffset" then if column.Nullable - then yield typeMismatch [ replace "dateTimeOrNone"; replace "timestamptzOrNone" ] - else yield typeMismatch [ replace "dateTime"; replace "timestamptz" ] + then yield typeMismatch [ replace "datetimeOffsetOrNone"; replace "dateTimeOrNone"; replace "timestamptzOrNone" ] + else yield typeMismatch [ replace "datetimeOffset"; replace "dateTime"; replace "timestamptz" ] else () | "bytea" -> diff --git a/src/NpgsqlFSharpAnalyzer.Core/SyntacticAnalysis.fs b/src/NpgsqlFSharpAnalyzer.Core/SyntacticAnalysis.fs index f294823..3d20dde 100644 --- a/src/NpgsqlFSharpAnalyzer.Core/SyntacticAnalysis.fs +++ b/src/NpgsqlFSharpAnalyzer.Core/SyntacticAnalysis.fs @@ -305,6 +305,8 @@ module SyntacticAnalysis = ".dateOrNone" ".dateTime" ".dateTimeOrNone" + ".datetimeOffset" + ".datetimeOffsetOrNone" ".intArray" ".intArrayOrNone" ".stringArray" diff --git a/src/NpgsqlFSharpAnalyzer/AssemblyInfo.fs b/src/NpgsqlFSharpAnalyzer/AssemblyInfo.fs index 8b65cf4..70460cb 100644 --- a/src/NpgsqlFSharpAnalyzer/AssemblyInfo.fs +++ b/src/NpgsqlFSharpAnalyzer/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "NpgsqlFSharpAnalyzer" let [] AssemblyProduct = "NpgsqlFSharpAnalyzer" - let [] AssemblyVersion = "3.16.0" + let [] AssemblyVersion = "3.17.0" let [] AssemblyMetadata_ReleaseDate = "2020-09-15T00:00:00.0000000" - let [] AssemblyFileVersion = "3.16.0" - let [] AssemblyInformationalVersion = "3.16.0" + let [] AssemblyFileVersion = "3.17.0" + let [] AssemblyInformationalVersion = "3.17.0" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "9ada11966d9a0a63829dd0976addedf8d6224a15" + let [] AssemblyMetadata_GitHash = "985f38c696391f5c8f38f4498e3a59db66ffe3c6" diff --git a/src/NpgsqlFSharpParser/AssemblyInfo.fs b/src/NpgsqlFSharpParser/AssemblyInfo.fs index 440807a..97f42cf 100644 --- a/src/NpgsqlFSharpParser/AssemblyInfo.fs +++ b/src/NpgsqlFSharpParser/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "NpgsqlFSharpParser" let [] AssemblyProduct = "NpgsqlFSharpAnalyzer" - let [] AssemblyVersion = "3.16.0" + let [] AssemblyVersion = "3.17.0" let [] AssemblyMetadata_ReleaseDate = "2020-09-15T00:00:00.0000000" - let [] AssemblyFileVersion = "3.16.0" - let [] AssemblyInformationalVersion = "3.16.0" + let [] AssemblyFileVersion = "3.17.0" + let [] AssemblyInformationalVersion = "3.17.0" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "9ada11966d9a0a63829dd0976addedf8d6224a15" + let [] AssemblyMetadata_GitHash = "985f38c696391f5c8f38f4498e3a59db66ffe3c6" diff --git a/src/NpgsqlFSharpVs/source.extension.vsixmanifest b/src/NpgsqlFSharpVs/source.extension.vsixmanifest index 4271adc..03e2b70 100644 --- a/src/NpgsqlFSharpVs/source.extension.vsixmanifest +++ b/src/NpgsqlFSharpVs/source.extension.vsixmanifest @@ -3,7 +3,7 @@ xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011"> - + NpgsqlFSharpVs F# Analyzer for embedded SQL syntax analysis, type-checking for parameters and result sets and nullable column detection when writing queries using Npgsql.FSharp. https://github.com/Zaid-Ajaj/Npgsql.FSharp.Analyzer diff --git a/tests/NpgsqlFSharpAnalyzer.Tests/AssemblyInfo.fs b/tests/NpgsqlFSharpAnalyzer.Tests/AssemblyInfo.fs index 9f39e32..0a403d0 100644 --- a/tests/NpgsqlFSharpAnalyzer.Tests/AssemblyInfo.fs +++ b/tests/NpgsqlFSharpAnalyzer.Tests/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "NpgsqlFSharpAnalyzer.Tests" let [] AssemblyProduct = "NpgsqlFSharpAnalyzer" - let [] AssemblyVersion = "3.16.0" + let [] AssemblyVersion = "3.17.0" let [] AssemblyMetadata_ReleaseDate = "2020-09-15T00:00:00.0000000" - let [] AssemblyFileVersion = "3.16.0" - let [] AssemblyInformationalVersion = "3.16.0" + let [] AssemblyFileVersion = "3.17.0" + let [] AssemblyInformationalVersion = "3.17.0" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "9ada11966d9a0a63829dd0976addedf8d6224a15" + let [] AssemblyMetadata_GitHash = "985f38c696391f5c8f38f4498e3a59db66ffe3c6" diff --git a/tests/examples/hashing/AssemblyInfo.fs b/tests/examples/hashing/AssemblyInfo.fs index db2cb70..1f8c355 100644 --- a/tests/examples/hashing/AssemblyInfo.fs +++ b/tests/examples/hashing/AssemblyInfo.fs @@ -4,20 +4,20 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] [] -[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "examples" let [] AssemblyProduct = "NpgsqlFSharpAnalyzer" - let [] AssemblyVersion = "3.16.0" + let [] AssemblyVersion = "3.17.0" let [] AssemblyMetadata_ReleaseDate = "2020-09-15T00:00:00.0000000" - let [] AssemblyFileVersion = "3.16.0" - let [] AssemblyInformationalVersion = "3.16.0" + let [] AssemblyFileVersion = "3.17.0" + let [] AssemblyInformationalVersion = "3.17.0" let [] AssemblyMetadata_ReleaseChannel = "release" - let [] AssemblyMetadata_GitHash = "9ada11966d9a0a63829dd0976addedf8d6224a15" + let [] AssemblyMetadata_GitHash = "985f38c696391f5c8f38f4498e3a59db66ffe3c6"