xhr.Driver.GaussDB.NodaTime
0.1.2
dotnet add package xhr.Driver.GaussDB.NodaTime --version 0.1.2
NuGet\Install-Package xhr.Driver.GaussDB.NodaTime -Version 0.1.2
<PackageReference Include="xhr.Driver.GaussDB.NodaTime" Version="0.1.2" />
<PackageVersion Include="xhr.Driver.GaussDB.NodaTime" Version="0.1.2" />
<PackageReference Include="xhr.Driver.GaussDB.NodaTime" />
paket add xhr.Driver.GaussDB.NodaTime --version 0.1.2
#r "nuget: xhr.Driver.GaussDB.NodaTime, 0.1.2"
#:package xhr.Driver.GaussDB.NodaTime@0.1.2
#addin nuget:?package=xhr.Driver.GaussDB.NodaTime&version=0.1.2
#tool nuget:?package=xhr.Driver.GaussDB.NodaTime&version=0.1.2
GaussDB is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.
This package is an GaussDB plugin which allows you to use the NodaTime date/time library when interacting with PostgreSQL; this provides a better and safer API for dealing with date and time data.
To use the NodaTime plugin, add a dependency on this package and create a GaussDBDataSource. Once this is done, you can use NodaTime types when interacting with PostgreSQL, just as you would use e.g. DateTime:
using HuaweiCloud.GaussDB;
var dataSourceBuilder = new GaussDBDataSourceBuilder(ConnectionString);
dataSourceBuilder.UseNodaTime();
var dataSource = dataSourceBuilder.Build();
var conn = await dataSource.OpenConnectionAsync();
// Write NodaTime Instant to PostgreSQL "timestamp with time zone" (UTC)
using (var cmd = new GaussDBCommand(@"INSERT INTO mytable (my_timestamptz) VALUES (@p)", conn))
{
cmd.Parameters.Add(new GaussDBParameter("p", Instant.FromUtc(2011, 1, 1, 10, 30)));
cmd.ExecuteNonQuery();
}
// Read timestamp back from the database as an Instant
using (var cmd = new GaussDBCommand(@"SELECT my_timestamptz FROM mytable", conn))
using (var reader = cmd.ExecuteReader())
{
reader.Read();
var instant = reader.GetFieldValue<Instant>(0);
}
For more information, visit the NodaTime plugin documentation page.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- NodaTime (>= 3.2.0)
- xhr.Driver.GaussDB (>= 0.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.2 | 128 | 6/1/2026 |