Skip to content

Commit abc2aab

Browse files
authored
Some more Npgsql 10 release note tweaks (#433)
1 parent 5634fb5 commit abc2aab

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

conceptual/EFCore.PG/release-notes/10.0.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,3 @@ See the [10.0.0 milestone](https://github.com/npgsql/efcore.pg/milestone/68?clos
161161

162162
* `EF.Functions.Network()` and `EF.Functions.Merge()` have been changed to return the new .NET [`IPNetwork`](https://learn.microsoft.com/dotnet/api/system.net.ipnetwork) instead of the obsolete `NpgsqlCidr`. The new `IPNetwork` type works with all other functions as well (but no breaking changes were necessary).
163163
* The PostgreSQL network type `cidr` is now scaffolded to the new .NET [`IPNetwork`](https://learn.microsoft.com/dotnet/api/system.net.ipnetwork) type. The older Npgsql representation for `cidr` - the `NpgsqlCidr` type - has been obsoleted and will be removed in a future release.
164-
165-
## Contributors
166-
167-
To be completed.

conceptual/Npgsql/release-notes/10.0.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Thanks to [@kirkbrauer](https://github.com/kirkbrauer) for contributing this fea
5757
* `NpgsqlConnection.Open` now wraps `SocketException` with `NpgsqlException` when hostname can't be resolved.
5858
* Metrics names are now more aligned to the OpenTelemetry standard (see breaking change note below).
5959
* The connection string now supports specifying `TargetSessionAttributes` when used with `NpgsqlDataSourceBuilder`. This means that code creating `NpgsqlDataSource` doesn't have to be aware that it's used with multiple hosts.
60+
* The built-in geometry types (e.g. `NpgsqlBox`) can now be deconstructed. Thanks [@ddas09](https://github.com/ddas09) for contributing!
61+
* The new `IDbTypeResolver` now allows remapping DbType values to arbitrary PostgreSQL types.
6062

6163
## Breaking changes
6264

@@ -91,3 +93,11 @@ This prevents accidental leak of queries and parameters when exceptions are logg
9193
### NpgsqlConnection.BeginText{Import,Export}Async now return NpgsqlCopyTextReader instead of TextWriter
9294

9395
The methods to start a text import/export operation have been changed to return a more specific `NpgsqlCopyTextReader`, rather than a general `TextWriter`; this was done since `NpgsqlCopyTextReader` exposes some additional APIs to allow cancelling and setting the timeout on a COPY operation. Since `NpgsqlCopyTextReader` extends `TextWriter`, this is a binary breaking change only - recompiling against the new version of Npgsql should work without any source changes.
96+
97+
### NpgsqlParameter.DataTypeName now takes precedence over NpgsqlDbType
98+
99+
NpgsqlParameter allows configuring which PostgreSQL is sent to the database via several methods: DataTypeName (for a PostgreSQL type name as a string), NpgsqlDbType (PG-specific enum), or DbType (database-agnostic enum). Starting with Npgsql 10, setting DataTypeName takes precedence over NpgsqlDbType.
100+
101+
### JSON mutable DOM mappings (e.g. JsonNode, JsonArray...) now require EnableJsonTypes on NpgsqlSlimDataSourceBuilder
102+
103+
NativeAOT applications which use `NpgsqlSlimDataSourceBuilder` and make use of mutable JSON types (`JsonNode`, `JsonValue`...) now have to call `EnableJsonTypes()`. Previously, calling `EnableJsonDynamicTypes()` added these mappings.

0 commit comments

Comments
 (0)