# 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
  object
  CoreTypeMapping
  RelationalTypeMapping
  NpgsqlTypeMapping
  NpgsqlRangeTypeMapping

Implements
  INpgsqlTypeMapping

Inherited Members
  NpgsqlTypeMapping.NpgsqlDbType
  NpgsqlTypeMapping.GenerateEmbeddedSqlLiteral(object)
  NpgsqlTypeMapping.GenerateEmbeddedProviderValueSqlLiteral(object)
  RelationalTypeMapping.NullMapping
  RelationalTypeMapping.Clone(CoreTypeMapping.CoreTypeMappingParameters)
  RelationalTypeMapping.WithStoreTypeAndSize(string, int?)
  RelationalTypeMapping.WithPrecisionAndScale(int?, int?)
  RelationalTypeMapping.WithComposedConverter(ValueConverter, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter)
  RelationalTypeMapping.WithTypeMappingInfo(in RelationalTypeMappingInfo)
  RelationalTypeMapping.Clone(in RelationalTypeMappingInfo?, Type, ValueConverter, ValueComparer, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter, StoreTypePostfix?)
  RelationalTypeMapping.ProcessStoreType(RelationalTypeMapping.RelationalTypeMappingParameters, string, string)
  RelationalTypeMapping.CreateParameter(DbCommand, string, object, bool?, ParameterDirection)
  RelationalTypeMapping.GenerateSqlLiteral(object)
  RelationalTypeMapping.GenerateProviderValueSqlLiteral(object)
  RelationalTypeMapping.GetDataReaderMethod()
  RelationalTypeMapping.GetDataReaderMethod(Type)
  RelationalTypeMapping.CustomizeDataReaderExpression(Expression)
  RelationalTypeMapping.Parameters
  RelationalTypeMapping.StoreTypePostfix
  RelationalTypeMapping.StoreType
  RelationalTypeMapping.StoreTypeNameBase
  RelationalTypeMapping.DbType
  RelationalTypeMapping.IsUnicode
  RelationalTypeMapping.Size
  RelationalTypeMapping.Precision
  RelationalTypeMapping.Scale
  RelationalTypeMapping.IsFixedLength
  RelationalTypeMapping.SqlLiteralFormatString
  CoreTypeMapping.Clone(in TypeMappingInfo?, Type, ValueConverter, ValueComparer, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter)
  CoreTypeMapping.ClrType
  CoreTypeMapping.Converter
  CoreTypeMapping.ValueGeneratorFactory
  CoreTypeMapping.Comparer
  CoreTypeMapping.KeyComparer
  CoreTypeMapping.ProviderValueComparer
  CoreTypeMapping.ElementTypeMapping
  CoreTypeMapping.JsonValueReaderWriter
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Remarks

See: https://www.postgresql.org/docs/current/static/rangetypes.html

## 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