Skip to content

SmartNpgsqlPolygonTypeHandler ​

Namespace: MJCZone.DapperMatic.TypeMapping.Handlers

Assembly: MJCZone.DapperMatic

Summary ​

Smart type handler for NpgsqlPolygon with provider-specific optimization. PostgreSQL: Native polygon type Others: WKT (Well-Known Text) format - "POLYGON((x1 y1, x2 y2, ..., x1 y1))"

Inheritance ​

Implemented Interfaces:

  • ITypeHandler

public

Contents ​

Constructors (1) | Methods (6)

Constructors ​

SmartNpgsqlPolygonTypeHandler ​

csharp
SmartNpgsqlPolygonTypeHandler()

Methods ​

MethodSummary
SetValueSets the parameter value for a polygon. PostgreSQL: Passes polygon directly (Npgsql converts NpgsqlP...
ParseParses a database value back to NpgsqlPolygon. PostgreSQL: Value is already NpgsqlPolygon from Npgsq...
GetType
ToString
Equals
GetHashCode

SetValue ​

Sets the parameter value for a polygon. PostgreSQL: Passes polygon directly (Npgsql converts NpgsqlPolygon to native PostgreSQL polygon). Other providers: Serializes polygon to WKT format.

csharp
void SetValue(IDbDataParameter parameter, object value)

Parameters ​

  • parameter (IDbDataParameter) - The database parameter to set.
  • value (object) - The NpgsqlPolygon value to store.

Parse ​

Parses a database value back to NpgsqlPolygon. PostgreSQL: Value is already NpgsqlPolygon from Npgsql. Other providers: Deserializes from WKT format.

csharp
object? Parse(Type destinationType, object value)

Parameters ​

  • destinationType (Type) - The target type (NpgsqlPolygon).
  • value (object) - The database value to parse.

Returns ​

Type: object?

An NpgsqlPolygon instance.

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()