Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The Microsoft.Data.SqlClient package supports the following environments:

- .NET Framework 4.6.2+
- .NET 8.0+
- .NET 9.0+

## Download

Expand Down
115 changes: 105 additions & 10 deletions release-notes/6.0/6.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,113 @@ This update brings the below changes over the previous stable release:

### Added

#### JSON Support

JSON Datatype support is now available in Microsoft.Data.SqlClient v6.0. This release introduces `SqlJson` type available as an extension to `System.Data.SqlDbTypes`:

```csharp
using System;
using System.Data.SqlTypes;
using System.Text.Json;

namespace Microsoft.Data.SqlTypes
{
/// <summary>
/// Represents the Json Data type in SQL Server.
/// </summary>
public class SqlJson : INullable
{
/// <summary>
/// Parameterless constructor. Initializes a new instance of the SqlJson class which
/// represents a null JSON value.
/// </summary>
public SqlJson() { }

/// <summary>
/// Takes a <see cref="string"/> as input and initializes a new instance of the SqlJson class.
/// </summary>
/// <param name="jsonString"></param>
public SqlJson(string jsonString) { }

/// <summary>
/// Takes a <see cref="JsonDocument"/> as input and initializes a new instance of the SqlJson class.
/// </summary>
/// <param name="jsonDoc"></param>
public SqlJson(JsonDocument jsonDoc) { }

/// <inheritdoc/>
public bool IsNull => throw null;

/// <summary>
/// Represents a null instance of the <see cref="SqlJson"/> type.
/// </summary>
public static SqlJson Null { get { throw null; } }

/// <summary>
/// Gets the string representation of the Json content of this <see cref="SqlJson" /> instance.
/// </summary>
public string Value { get ; }
}
}
```

JSON datatype is supported by the driver for reading, writing, streaming and performing bulk copy operations.

Implemented in PRs: [#2916](https://github.com/dotnet/SqlClient/pull/2916), [#2892](https://github.com/dotnet/SqlClient/pull/2892), [#2891](https://github.com/dotnet/SqlClient/pull/2891), [#2880](https://github.com/dotnet/SqlClient/pull/2880), [#2882](https://github.com/dotnet/SqlClient/pull/2882), [#2829](https://github.com/dotnet/SqlClient/pull/2829), [#2830](https://github.com/dotnet/SqlClient/pull/2830)

#### Introducing SqlClientDiagnostics

`SqlClientDiagnostic` is now available as a strongly-typed collection of key-value pairs that can be captured by consuming applications.

```csharp
// Class that provides strongly-typed collection of key-value pairs for SqlClient diagnostic objects.
public abstract class SqlClientDiagnostic : System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<string, object>>
{
// A guid value used to correlate before, after and error events.
public System.Guid OperationId;

// The name of the operation.
public string Operation;

// The timestamp of the event.
public long Timestamp;

// The number of elements in the collection.
public int Count;

// The element at the specified index in the read-only list.
public System.Collections.Generic.KeyValuePair<string, object> this[int index];

// An enumerator that can be used to iterate through the collection.
public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, object>> GetEnumerator();
}
```

Implemented in PR: [#2226](https://github.com/dotnet/SqlClient/pull/2226)

#### Added Support for Connection Overrides in `OpenAsync()` API

The default behavior of `SqlConnection.OpenAsync()` can be overridden to disable the ten-second delay and automatic connection retries triggered by transient errors.

```csharp
using(SqlConnection sqlConnection = new SqlConnection("Data Source=(local);Integrated Security=true;Initial Catalog=AdventureWorks;"))
{
await sqlConnection.OpenAsync(SqlConnectionOverrides.OpenWithoutRetry, cancellationToken);
}
```

Implemented in PR: [#2433](https://github.com/dotnet/SqlClient/pull/2433)

#### Msc Additions

- Added support for .NET 9 [#2946](https://github.com/dotnet/SqlClient/pull/2946)
- Added localization in Czech, Polish, and Turkish [#2987](https://github.com/dotnet/SqlClient/pull/2987)
- Added `TokenCredential` object to take advantage of token caching in `ActiveDirectoryAuthenticationProvider`. [#2380](https://github.com/dotnet/SqlClient/pull/2380)
- Added `DateOnly` and `TimeOnly` support to `DataTable` as a structured parameter. [#2258](https://github.com/dotnet/SqlClient/pull/2258)
- Added `Microsoft.Data.SqlClient.Diagnostics.SqlClientDiagnostic` type in .NET. [#2226](https://github.com/dotnet/SqlClient/pull/2226)
- Added scope trace for `GenerateSspiClientContext`. [#2497](https://github.com/dotnet/SqlClient/pull/2497), [#2725](https://github.com/dotnet/SqlClient/pull/2725)
- Added support for JSON datatype [#2916](https://github.com/dotnet/SqlClient/pull/2916), [#2892](https://github.com/dotnet/SqlClient/pull/2892), [#2891](https://github.com/dotnet/SqlClient/pull/2891), [#2880](https://github.com/dotnet/SqlClient/pull/2880), [#2882](https://github.com/dotnet/SqlClient/pull/2882), [#2829](https://github.com/dotnet/SqlClient/pull/2829), [#2830](https://github.com/dotnet/SqlClient/pull/2830)
- Added readme to nuget package [#2826](https://github.com/dotnet/SqlClient/pull/2826)
- Enabled NuGet package auditing via NuGet.org audit source [#3024](https://github.com/dotnet/SqlClient/pull/3024)
- Added missing SqlCommand_BeginExecuteReader code sample [#3009](https://github.com/dotnet/SqlClient/pull/3009)
- Added support for SqlConnectionOverrides in OpenAsync() API [#2433](https://github.com/dotnet/SqlClient/pull/2433)

### Fixed

Expand Down Expand Up @@ -65,7 +161,7 @@ This update brings the below changes over the previous stable release:
- Updated `Azure.Core` version from `1.35.0` to `1.38.0`. [#2462](https://github.com/dotnet/SqlClient/pull/2462)
- Updated `Azure.Identity` version from `1.10.3` to `1.11.4`. [#2577](https://github.com/dotnet/SqlClient/pull/2577)
- Updated `Azure.Security.KeyVault.Keys` version from `4.4.0` to `4.5.0`. [#2462](https://github.com/dotnet/SqlClient/pull/2462)
- Updated `Microsoft.Data.SqlClient.SNI` version to `6.0.0-preview1.24226.4`. [#2772](https://github.com/dotnet/SqlClient/pull/2772)
- Updated `Microsoft.Data.SqlClient.SNI` version to `6.0.1`. [#3100](https://github.com/dotnet/SqlClient/pull/3096)
- Updated `Microsoft.IdentityModel.JsonWebTokens` and `Microsoft.IdentityModel.Protocols.OpenIdConnect` from `6.35.0` to `7.5.0`. [#2429](https://github.com/dotnet/SqlClient/pull/2429)
- Updated `Microsoft.Extensions.Caching.Memory` from `8.0.0` to `9.0.0` [#2921](https://github.com/dotnet/SqlClient/pull/2921)
- Updated `System.Configuration.ConfigurationManager` from `8.0.0` to `9.0.10` for .NET 8 [#2921](https://github.com/dotnet/SqlClient/pull/2921)
Expand All @@ -77,18 +173,17 @@ This update brings the below changes over the previous stable release:
- Reverted the [#2281](https://github.com/dotnet/SqlClient/pull/2281) code changes on ManagedSNI. [#2395](https://github.com/dotnet/SqlClient/pull/2395)
- Updated assembly version to 6.0.0.0. [#2382](https://github.com/dotnet/SqlClient/pull/2382), since Preview 1
- Updated docs to use absolute links [#2949](https://github.com/dotnet/SqlClient/pull/2949), since Preview 3
- Code health improvements: [#2366](https://github.com/dotnet/SqlClient/pull/2366), [#2369](https://github.com/dotnet/SqlClient/pull/2369), [#2376](https://github.com/dotnet/SqlClient/pull/2376), [#2381](https://github.com/dotnet/SqlClient/pull/2381), [#2390](https://github.com/dotnet/SqlClient/pull/2390), [#2392](https://github.com/dotnet/SqlClient/pull/2392), [#2403](https://github.com/dotnet/SqlClient/pull/2403), [#2410](https://github.com/dotnet/SqlClient/pull/2410), [#2413](https://github.com/dotnet/SqlClient/pull/2413), [#2425](https://github.com/dotnet/SqlClient/pull/2425), [#2428](https://github.com/dotnet/SqlClient/pull/2428), [#2440](https://github.com/dotnet/SqlClient/pull/2440), [#2442](https://github.com/dotnet/SqlClient/pull/2442), [#2443](https://github.com/dotnet/SqlClient/pull/2443), [#2450](https://github.com/dotnet/SqlClient/pull/2450), [#2466](https://github.com/dotnet/SqlClient/pull/2466), [#2486](https://github.com/dotnet/SqlClient/pull/2486), [#2521](https://github.com/dotnet/SqlClient/pull/2521), [#2522](https://github.com/dotnet/SqlClient/pull/2522), [#2533](https://github.com/dotnet/SqlClient/pull/2533), [#2552](https://github.com/dotnet/SqlClient/pull/2552), [#2560](https://github.com/dotnet/SqlClient/pull/2560), [#2726](https://github.com/dotnet/SqlClient/pull/2726), [#2751](https://github.com/dotnet/SqlClient/pull/2751), [#2805](https://github.com/dotnet/SqlClient/pull/2805), [#2811](https://github.com/dotnet/SqlClient/pull/2811), [#2812](https://github.com/dotnet/SqlClient/pull/2812), [#2814](https://github.com/dotnet/SqlClient/pull/2814), [#2820](https://github.com/dotnet/SqlClient/pull/2820), [#2831](https://github.com/dotnet/SqlClient/pull/2831), [#2835](https://github.com/dotnet/SqlClient/pull/2835), [#2844](https://github.com/dotnet/SqlClient/pull/2844), [#2854](https://github.com/dotnet/SqlClient/pull/2854), [#2885](https://github.com/dotnet/SqlClient/pull/2885), [#2889](https://github.com/dotnet/SqlClient/pull/2889), [#2897](https://github.com/dotnet/SqlClient/pull/2897), [#2898](https://github.com/dotnet/SqlClient/pull/2898), [#2907](https://github.com/dotnet/SqlClient/pull/2907), [#2910](https://github.com/dotnet/SqlClient/pull/2910), [#2915](https://github.com/dotnet/SqlClient/pull/2915), [#2928](https://github.com/dotnet/SqlClient/pull/2928), [#2929](https://github.com/dotnet/SqlClient/pull/2929), [#2936](https://github.com/dotnet/SqlClient/pull/2936), [#2939](https://github.com/dotnet/SqlClient/pull/2939)
- Code health improvements: [#2366](https://github.com/dotnet/SqlClient/pull/2366), [#2369](https://github.com/dotnet/SqlClient/pull/2369), [#2376](https://github.com/dotnet/SqlClient/pull/2376), [#2381](https://github.com/dotnet/SqlClient/pull/2381), [#2390](https://github.com/dotnet/SqlClient/pull/2390), [#2392](https://github.com/dotnet/SqlClient/pull/2392), [#2403](https://github.com/dotnet/SqlClient/pull/2403), [#2410](https://github.com/dotnet/SqlClient/pull/2410), [#2413](https://github.com/dotnet/SqlClient/pull/2413), [#2425](https://github.com/dotnet/SqlClient/pull/2425), [#2428](https://github.com/dotnet/SqlClient/pull/2428), [#2440](https://github.com/dotnet/SqlClient/pull/2440), [#2442](https://github.com/dotnet/SqlClient/pull/2442), [#2443](https://github.com/dotnet/SqlClient/pull/2443), [#2450](https://github.com/dotnet/SqlClient/pull/2450), [#2466](https://github.com/dotnet/SqlClient/pull/2466), [#2486](https://github.com/dotnet/SqlClient/pull/2486), [#2521](https://github.com/dotnet/SqlClient/pull/2521), [#2522](https://github.com/dotnet/SqlClient/pull/2522), [#2533](https://github.com/dotnet/SqlClient/pull/2533), [#2552](https://github.com/dotnet/SqlClient/pull/2552), [#2560](https://github.com/dotnet/SqlClient/pull/2560), [#2726](https://github.com/dotnet/SqlClient/pull/2726), [#2751](https://github.com/dotnet/SqlClient/pull/2751), [#2805](https://github.com/dotnet/SqlClient/pull/2805), [#2811](https://github.com/dotnet/SqlClient/pull/2811), [#2812](https://github.com/dotnet/SqlClient/pull/2812), [#2814](https://github.com/dotnet/SqlClient/pull/2814), [#2820](https://github.com/dotnet/SqlClient/pull/2820), [#2831](https://github.com/dotnet/SqlClient/pull/2831), [#2835](https://github.com/dotnet/SqlClient/pull/2835), [#2844](https://github.com/dotnet/SqlClient/pull/2844), [#2854](https://github.com/dotnet/SqlClient/pull/2854), [#2885](https://github.com/dotnet/SqlClient/pull/2885), [#2889](https://github.com/dotnet/SqlClient/pull/2889), [#2897](https://github.com/dotnet/SqlClient/pull/2897), [#2898](https://github.com/dotnet/SqlClient/pull/2898), [#2907](https://github.com/dotnet/SqlClient/pull/2907), [#2910](https://github.com/dotnet/SqlClient/pull/2910), [#2915](https://github.com/dotnet/SqlClient/pull/2915), [#2928](https://github.com/dotnet/SqlClient/pull/2928), [#2929](https://github.com/dotnet/SqlClient/pull/2929), [#2936](https://github.com/dotnet/SqlClient/pull/2936), [#2939](https://github.com/dotnet/SqlClient/pull/2939)

## Target Platform Support
- .NET Framework 4.6.2+ (Windows ARM64, Windows x64, Windows x86)
- .NET 8.0, 9.0 (Linux, macOS, Windows ARM64, Windows x64, Windows x86)
- .NET 8.0+ (Linux, macOS, Windows ARM64, Windows x64, Windows x86)

### Dependencies

#### .NET Framework
- Azure.Identity 1.11.4
- Microsoft.Bcl.Cryptography 9.0.0
- Microsoft.Data.SqlClient.SNI 6.0.0-preview1.24226.4
- Microsoft.Data.SqlClient.SNI 6.0.1
- Microsoft.Extensions.Caching.Memory 9.0.0
- Microsoft.IdentityModel.JsonWebTokens 7.5.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.5.0
Expand All @@ -101,7 +196,7 @@ This update brings the below changes over the previous stable release:

- Azure.Identity 1.11.4
- Microsoft.Bcl.Cryptography 9.0.0
- Microsoft.Data.SqlClient.SNI.runtime 6.0.0-preview1.24226.4
- Microsoft.Data.SqlClient.SNI.runtime 6.0.1
- Microsoft.Extensions.Caching.Memory 9.0.0
- Microsoft.IdentityModel.JsonWebTokens 7.5.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.5.0
Expand All @@ -113,7 +208,7 @@ This update brings the below changes over the previous stable release:

- Azure.Identity 1.11.4
- Microsoft.Bcl.Cryptography 9.0.0
- Microsoft.Data.SqlClient.SNI.runtime 6.0.0-preview1.24226.4
- Microsoft.Data.SqlClient.SNI.runtime 6.0.1
- Microsoft.Extensions.Caching.Memory 9.0.0
- Microsoft.IdentityModel.JsonWebTokens 7.5.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 7.5.0
Expand Down