-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/5.0.5' into stable
- Loading branch information
Showing
27 changed files
with
326 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Code analysis rules and configuration | ||
|
||
root = false | ||
|
||
# Code files | ||
[*.cs] | ||
|
||
# Design rules | ||
|
||
# CA1001: Types that own disposable fields should be disposable | ||
dotnet_diagnostic.CA1001.severity = error | ||
|
||
# Globalization rules | ||
|
||
# CA1303: Do not pass literals as localized parameters | ||
dotnet_diagnostic.CA1303.severity = none | ||
|
||
# CA1304: Specify CultureInfo | ||
dotnet_diagnostic.CA1304.severity = error | ||
|
||
# CA1305: Specify IFormatProvider | ||
dotnet_diagnostic.CA1305.severity = none | ||
|
||
# CA1307: Specify StringComparison for clarity | ||
dotnet_diagnostic.CA1307.severity = none | ||
|
||
# CA1308: Normalize strings to uppercase | ||
dotnet_diagnostic.CA1308.severity = none | ||
|
||
# CA1309: Use ordinal stringcomparison | ||
dotnet_diagnostic.CA1309.severity = error | ||
|
||
# CA1310: Specify StringComparison for correctness | ||
dotnet_diagnostic.CA1310.severity = error | ||
|
||
# CA2101: Specify marshaling for P/Invoke string arguments | ||
dotnet_diagnostic.CA2101.severity = error | ||
|
||
# Reliability Rules | ||
|
||
# CA2000: Dispose objects before losing scope | ||
# Not reliable enough - false positives | ||
dotnet_diagnostic.CA2000.severity = suggestion | ||
|
||
# CA2002: Do not lock on objects with weak identity | ||
dotnet_diagnostic.CA2002.severity = error | ||
|
||
# CA2007: Consider calling ConfigureAwait on the awaited task | ||
dotnet_diagnostic.CA2007.severity = error | ||
|
||
# CA2008: Do not create tasks without passing a TaskScheduler | ||
dotnet_diagnostic.CA2008.severity = error | ||
|
||
# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value | ||
dotnet_diagnostic.CA2009.severity = error | ||
|
||
# CA2011: Avoid infinite recursion | ||
dotnet_diagnostic.CA2011.severity = error | ||
|
||
# CA2012: Use ValueTasks correctly | ||
dotnet_diagnostic.CA2012.severity = error | ||
|
||
# CA2013: Do not use ReferenceEquals with value types | ||
dotnet_diagnostic.CA2013.severity = error | ||
|
||
# CA2014: Do not use stackalloc in loops | ||
dotnet_diagnostic.CA2014.severity = error | ||
|
||
# CA2015: Do not define finalizers for types derived from MemoryManager<T> | ||
dotnet_diagnostic.CA2015.severity = error | ||
|
||
# CA2016: Forward the 'CancellationToken' parameter to methods that take one | ||
dotnet_diagnostic.CA2016.severity = error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
using Microsoft.EntityFrameworkCore.Storage; | ||
using JetBrains.Annotations; | ||
using Microsoft.EntityFrameworkCore.Storage; | ||
|
||
namespace Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal | ||
{ | ||
public interface INpgsqlRelationalConnection : IRelationalConnection | ||
{ | ||
INpgsqlRelationalConnection CreateMasterConnection(); | ||
|
||
NpgsqlRelationalConnection CloneWith([NotNull] string connectionString); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlDecimalTypeMapping.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Microsoft.EntityFrameworkCore.Storage; | ||
|
||
namespace Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping | ||
{ | ||
public class NpgsqlDecimalTypeMapping : DecimalTypeMapping | ||
{ | ||
public NpgsqlDecimalTypeMapping() : base("numeric", System.Data.DbType.Decimal) {} | ||
|
||
protected NpgsqlDecimalTypeMapping(RelationalTypeMappingParameters parameters) | ||
: base(parameters) | ||
{ | ||
} | ||
|
||
protected override RelationalTypeMapping Clone(RelationalTypeMappingParameters parameters) | ||
=> new NpgsqlDecimalTypeMapping(parameters); | ||
|
||
protected override string ProcessStoreType(RelationalTypeMappingParameters parameters, string storeType, string _) | ||
=> parameters.Precision is null | ||
? storeType | ||
: parameters.Scale is null | ||
? $"numeric({parameters.Precision})" | ||
: $"numeric({parameters.Precision},{parameters.Scale})"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.