Class NpgsqlTypeMapping
- 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
parametersRelationalTypeMapping.RelationalTypeMappingParametersThe parameters for this mapping.
npgsqlDbTypeNpgsqlDbTypeThe 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
storeTypestringThe database type to map.
clrTypeTypeThe CLR type to map.
npgsqlDbTypeNpgsqlDbTypeThe database type used by Npgsql.
jsonValueReaderWriterJsonValueReaderWriterHandles 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
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
parameterDbParameter
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
valueobjectThe 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
valueobjectThe 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
valueobjectThe literal value.
Returns
- string
The generated string.