Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions src/EFCore.PG/Storage/Internal/NpgsqlTypeMappingSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static NpgsqlTypeMappingSource()
private readonly NpgsqlCharacterCharTypeMapping _singleChar = new("character(1)");
private readonly NpgsqlStringTypeMapping _xml = new("xml", NpgsqlDbType.Xml);
private readonly NpgsqlStringTypeMapping _citext = new("citext", NpgsqlDbType.Citext);
private readonly NpgsqlStringTypeMapping _jsonpath = new("jsonpath", NpgsqlDbType.JsonPath);

// JSON mappings - EF owned entity support
private readonly NpgsqlOwnedJsonTypeMapping _jsonbOwned = new("jsonb");
Expand Down Expand Up @@ -234,6 +235,7 @@ public NpgsqlTypeMappingSource(
{ "text", [_text] },
{ "jsonb", [_jsonbString, _jsonbDocument, _jsonbElement] },
{ "json", [_jsonString, _jsonDocument, _jsonElement] },
{ "jsonpath", [_jsonpath] },
{ "xml", [_xml] },
{ "citext", [_citext] },
{ "character varying", [_varchar] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class NpgsqlTypeMappingSourceTest
[InlineData("geometry(POLYGONM)", typeof(Polygon), null, null, null, false)]
[InlineData("xid", typeof(uint), null, null, null, false)]
[InlineData("xid8", typeof(ulong), null, null, null, false)]
[InlineData("jsonpath", typeof(string), null, null, null, false)]
public void By_StoreType(string typeName, Type type, int? size, int? precision, int? scale, bool fixedLength)
{
var mapping = CreateTypeMappingSource().FindMapping(typeName);
Expand Down