Table of Contents

Class NpgsqlTypeMapping

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

The base class for mapping Npgsql-specific types. It configures parameters with the NpgsqlDbType provider-specific type enum.

public abstract class NpgsqlTypeMapping : RelationalTypeMapping, INpgsqlTypeMapping
Inheritance
NpgsqlTypeMapping
Implements
Derived
Inherited Members

Constructors

NpgsqlTypeMapping(RelationalTypeMappingParameters, NpgsqlDbType)

Constructs an instance of the NpgsqlTypeMapping class.

protected NpgsqlTypeMapping(RelationalTypeMapping.RelationalTypeMappingParameters parameters, NpgsqlDbType npgsqlDbType)

Parameters

parameters RelationalTypeMapping.RelationalTypeMappingParameters

The parameters for this mapping.

npgsqlDbType NpgsqlDbType

The database type of the range subtype.

NpgsqlTypeMapping(string, Type, NpgsqlDbType, JsonValueReaderWriter?)

Constructs an instance of the NpgsqlTypeMapping class.

public NpgsqlTypeMapping(string storeType, Type clrType, NpgsqlDbType npgsqlDbType, JsonValueReaderWriter? jsonValueReaderWriter = null)

Parameters

storeType string

The database type to map.

clrType Type

The CLR type to map.

npgsqlDbType NpgsqlDbType

The database type used by Npgsql.

jsonValueReaderWriter JsonValueReaderWriter

Handles reading and writing JSON values for instances of the mapped type.

Properties

NpgsqlDbType

The database type used by Npgsql.

public virtual NpgsqlDbType NpgsqlDbType { get; }

Property Value

NpgsqlDbType

Methods

ConfigureParameter(DbParameter)

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 void ConfigureParameter(DbParameter parameter)

Parameters

parameter DbParameter

GenerateEmbeddedNonNullSqlLiteral(object)

Generates the SQL representation of a non-null literal value, meant to be embedded in another literal value, e.g. in a range.

protected virtual string GenerateEmbeddedNonNullSqlLiteral(object value)

Parameters

value object

The literal value.

Returns

string

The generated string.

GenerateEmbeddedProviderValueSqlLiteral(object?)

Generates the SQL representation of a literal value without conversion, meant to be embedded in another literal value, e.g. in a range.

public virtual string GenerateEmbeddedProviderValueSqlLiteral(object? value)

Parameters

value object

The literal value.

Returns

string

The generated string.

GenerateEmbeddedSqlLiteral(object?)

Generates the SQL representation of a literal value meant to be embedded in another literal value, e.g. in a range.

public virtual string GenerateEmbeddedSqlLiteral(object? value)

Parameters

value object

The literal value.

Returns

string

The generated string.