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
parameters
RelationalTypeMapping.RelationalTypeMappingParametersThe parameters for this mapping.
npgsqlDbType
NpgsqlDbTypeThe 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
stringThe database type to map.
clrType
TypeThe CLR type to map.
npgsqlDbType
NpgsqlDbTypeThe database type used by Npgsql.
jsonValueReaderWriter
JsonValueReaderWriterHandles 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
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
objectThe 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
objectThe 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
objectThe literal value.
Returns
- string
The generated string.