Table of Contents

Class NpgsqlJsonTypeMapping

Namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
Assembly
Npgsql.EntityFrameworkCore.PostgreSQL.dll

Supports the older Npgsql-specific JSON mapping, allowing mapping json/jsonb to text, to e.g. JsonElement (weakly-typed mapping) or to arbitrary POCOs (but without them being modeled). For the standard EF JSON support, which relies on owned entity modeling, see NpgsqlOwnedJsonTypeMapping.

public class NpgsqlJsonTypeMapping : NpgsqlTypeMapping, INpgsqlTypeMapping
Inheritance
NpgsqlJsonTypeMapping
Implements
Inherited Members

Constructors

NpgsqlJsonTypeMapping(RelationalTypeMappingParameters, NpgsqlDbType)

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.

protected NpgsqlJsonTypeMapping(RelationalTypeMapping.RelationalTypeMappingParameters parameters, NpgsqlDbType npgsqlDbType)

Parameters

parameters RelationalTypeMapping.RelationalTypeMappingParameters
npgsqlDbType NpgsqlDbType

NpgsqlJsonTypeMapping(string, Type)

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.

public NpgsqlJsonTypeMapping(string storeType, Type clrType)

Parameters

storeType string
clrType Type

Properties

Default

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.

public static NpgsqlJsonTypeMapping Default { get; }

Property Value

NpgsqlJsonTypeMapping

IsJsonb

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.

public virtual bool IsJsonb { get; }

Property Value

bool

Methods

Clone(RelationalTypeMappingParameters)

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.

protected override RelationalTypeMapping Clone(RelationalTypeMapping.RelationalTypeMappingParameters parameters)

Parameters

parameters RelationalTypeMapping.RelationalTypeMappingParameters

Returns

RelationalTypeMapping

EscapeSqlLiteral(string)

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.

protected virtual string EscapeSqlLiteral(string literal)

Parameters

literal string

Returns

string

GenerateCodeLiteral(object)

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.

public override Expression GenerateCodeLiteral(object value)

Parameters

value object

Returns

Expression

GenerateNonNullSqlLiteral(object)

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.

protected override string GenerateNonNullSqlLiteral(object value)

Parameters

value object

Returns

string