Table of Contents

Class NpgsqlRangeTypeMapping

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

The type mapping for PostgreSQL range types.

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

Remarks

Constructors

NpgsqlRangeTypeMapping(RelationalTypeMappingParameters, NpgsqlDbType, RelationalTypeMapping)

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 NpgsqlRangeTypeMapping(RelationalTypeMapping.RelationalTypeMappingParameters parameters, NpgsqlDbType npgsqlDbType, RelationalTypeMapping subtypeMapping)

Parameters

parameters RelationalTypeMapping.RelationalTypeMappingParameters
npgsqlDbType NpgsqlDbType
subtypeMapping RelationalTypeMapping

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 NpgsqlRangeTypeMapping Default { get; }

Property Value

NpgsqlRangeTypeMapping

SubtypeMapping

The relational type mapping of the range's subtype.

public virtual RelationalTypeMapping SubtypeMapping { get; }

Property Value

RelationalTypeMapping

UnquotedStoreType

For user-defined ranges, we have no NpgsqlDbType and so the PG type name is set on DataTypeName instead.

public virtual string? UnquotedStoreType { get; init; }

Property Value

string

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

Clone(NpgsqlDbType, RelationalTypeMapping)

This method exists only to support the compiled model.

public virtual NpgsqlRangeTypeMapping Clone(NpgsqlDbType npgsqlDbType, RelationalTypeMapping subtypeTypeMapping)

Parameters

npgsqlDbType NpgsqlDbType
subtypeTypeMapping RelationalTypeMapping

Returns

NpgsqlRangeTypeMapping

Remarks

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.

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

CreatBuiltInRangeMapping(string, Type, NpgsqlDbType, RelationalTypeMapping)

Constructs an instance of the NpgsqlRangeTypeMapping class for a built-in range type which has a NpgsqlDbType defined.

public static NpgsqlRangeTypeMapping CreatBuiltInRangeMapping(string rangeStoreType, Type rangeClrType, NpgsqlDbType rangeNpgsqlDbType, RelationalTypeMapping subtypeMapping)

Parameters

rangeStoreType string

The database type to map

rangeClrType Type

The CLR type to map.

rangeNpgsqlDbType NpgsqlDbType

The NpgsqlDbType of the built-in range.

subtypeMapping RelationalTypeMapping

The type mapping for the range subtype.

Returns

NpgsqlRangeTypeMapping

CreatUserDefinedRangeMapping(string, string, Type, RelationalTypeMapping)

Constructs an instance of the NpgsqlRangeTypeMapping class for a user-defined range type which doesn't have a NpgsqlDbType defined.

public static NpgsqlRangeTypeMapping CreatUserDefinedRangeMapping(string quotedRangeStoreType, string unquotedRangeStoreType, Type rangeClrType, RelationalTypeMapping subtypeMapping)

Parameters

quotedRangeStoreType string

The database type to map, quoted.

unquotedRangeStoreType string

The database type to map, unquoted.

rangeClrType Type

The CLR type to map.

subtypeMapping RelationalTypeMapping

The type mapping for the range subtype.

Returns

NpgsqlRangeTypeMapping

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

GenerateEmbeddedNonNullSqlLiteral(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 GenerateEmbeddedNonNullSqlLiteral(object value)

Parameters

value object

Returns

string

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