Skip to content

Commit

Permalink
Support NpgsqlUIntTypeMapping for the compiled model (#3030)
Browse files Browse the repository at this point in the history
Fixes #2992

(cherry picked from commit 7479042)
  • Loading branch information
roji committed Dec 18, 2023
1 parent 557e166 commit baaf41f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public override bool Create(
var npgsqlDbTypeBasedDefaultInstance = typeMapping switch
{
NpgsqlStringTypeMapping => NpgsqlStringTypeMapping.Default,
NpgsqlUIntTypeMapping => NpgsqlUIntTypeMapping.Default,
NpgsqlULongTypeMapping => NpgsqlULongTypeMapping.Default,
// NpgsqlMultirangeTypeMapping => NpgsqlMultirangeTypeMapping.Default,
_ => (INpgsqlTypeMapping?)null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping;
/// </summary>
public class NpgsqlUIntTypeMapping : NpgsqlTypeMapping
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public static NpgsqlUIntTypeMapping Default { get; } = new("xid", NpgsqlDbType.Xid);

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
Expand Down

0 comments on commit baaf41f

Please sign in to comment.