Skip to content

SmartNpgsqlLSegTypeHandler

Namespace: MJCZone.DapperMatic.TypeMapping.Handlers

Assembly: MJCZone.DapperMatic

Summary

Smart type handler for NpgsqlLSeg (line segment) with provider-specific optimization. PostgreSQL: Native lseg type Others: WKT (Well-Known Text) format - "LINESTRING(x1 y1, x2 y2)"

Inheritance

Implemented Interfaces:

  • ITypeHandler

public

Contents

Constructors (1) | Methods (6)

Constructors

SmartNpgsqlLSegTypeHandler

csharp
SmartNpgsqlLSegTypeHandler()

Methods

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

SetValue

Sets the parameter value for a line segment. PostgreSQL: Passes lseg directly (Npgsql converts NpgsqlLSeg to native PostgreSQL lseg). Other providers: Serializes lseg to WKT LINESTRING format.

csharp
void SetValue(IDbDataParameter parameter, object value)

Parameters

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

Parse

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

csharp
object? Parse(Type destinationType, object value)

Parameters

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

Returns

Type: object?

An NpgsqlLSeg instance.

GetType

csharp
GetType()

ToString

csharp
ToString()

Equals

csharp
Equals()

GetHashCode

csharp
GetHashCode()