Skip to content

SmartNpgsqlPathTypeHandler

Namespace: MJCZone.DapperMatic.TypeMapping.Handlers

Assembly: MJCZone.DapperMatic

Summary

Smart type handler for NpgsqlPath with provider-specific optimization. PostgreSQL: Native path type Others: WKT (Well-Known Text) format - "LINESTRING(...)" for open paths, "POLYGON((...)))" for closed paths

Inheritance

Implemented Interfaces:

  • ITypeHandler

public

Contents

Constructors (1) | Methods (6)

Constructors

SmartNpgsqlPathTypeHandler

csharp
SmartNpgsqlPathTypeHandler()

Methods

MethodSummary
SetValueSets the parameter value for a path. PostgreSQL: Passes path directly (Npgsql converts NpgsqlPath to...
ParseParses a database value back to NpgsqlPath. PostgreSQL: Value is already NpgsqlPath from Npgsql. Oth...
GetType
ToString
Equals
GetHashCode

SetValue

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

csharp
void SetValue(IDbDataParameter parameter, object value)

Parameters

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

Parse

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

csharp
object? Parse(Type destinationType, object value)

Parameters

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

Returns

Type: object?

An NpgsqlPath instance.

GetType

csharp
GetType()

ToString

csharp
ToString()

Equals

csharp
Equals()

GetHashCode

csharp
GetHashCode()