Class NpgsqlTypeMapping
The base class for mapping Npgsql-specific types. It configures parameters with the NpgsqlDbType provider-specific type enum.
Inheritance
Implements
Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public abstract class NpgsqlTypeMapping : RelationalTypeMapping, INpgsqlTypeMapping
Constructors
| Improve this Doc View SourceNpgsqlTypeMapping(RelationalTypeMappingParameters, NpgsqlDbType)
Constructs an instance of the NpgsqlTypeMapping class.
Declaration
protected NpgsqlTypeMapping(RelationalTypeMappingParameters parameters, NpgsqlDbType npgsqlDbType)
Parameters
Type | Name | Description |
---|---|---|
RelationalTypeMappingParameters | parameters | The parameters for this mapping. |
NpgsqlDbType | npgsqlDbType | The database type of the range subtype. |
NpgsqlTypeMapping(string, Type, NpgsqlDbType)
Constructs an instance of the NpgsqlTypeMapping class.
Declaration
public NpgsqlTypeMapping(string storeType, Type clrType, NpgsqlDbType npgsqlDbType)
Parameters
Type | Name | Description |
---|---|---|
string | storeType | The database type to map. |
Type | clrType | The CLR type to map. |
NpgsqlDbType | npgsqlDbType | The database type used by Npgsql. |
Properties
| Improve this Doc View SourceNpgsqlDbType
The database type used by Npgsql.
Declaration
public virtual NpgsqlDbType NpgsqlDbType { get; }
Property Value
Type | Description |
---|---|
NpgsqlDbType |
Methods
| Improve this Doc View SourceConfigureParameter(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.
Declaration
protected override void ConfigureParameter(DbParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
DbParameter | parameter |
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.
Declaration
protected virtual string GenerateEmbeddedNonNullSqlLiteral(object value)
Parameters
Type | Name | Description |
---|---|---|
object | value | The literal value. |
Returns
Type | Description |
---|---|
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.
Declaration
public virtual string GenerateEmbeddedProviderValueSqlLiteral(object? value)
Parameters
Type | Name | Description |
---|---|---|
object? | value | The literal value. |
Returns
Type | Description |
---|---|
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.
Declaration
public virtual string GenerateEmbeddedSqlLiteral(object? value)
Parameters
Type | Name | Description |
---|---|---|
object? | value | The literal value. |
Returns
Type | Description |
---|---|
string | The generated string. |