Skip to content

SmartNpgsqlLineTypeHandler

Namespace: MJCZone.DapperMatic.TypeMapping.Handlers

Assembly: MJCZone.DapperMatic

Summary

Smart type handler for NpgsqlLine with provider-specific optimization. PostgreSQL: Native line type (infinite line represented by equation Ax + By + C = 0) Others: Extended WKT format - "LINE(a b c)"

Inheritance

Implemented Interfaces:

  • ITypeHandler

public

Contents

Constructors (1) | Methods (6)

Constructors

SmartNpgsqlLineTypeHandler

csharp
SmartNpgsqlLineTypeHandler()

Methods

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

SetValue

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

csharp
void SetValue(IDbDataParameter parameter, object value)

Parameters

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

Parse

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

csharp
object? Parse(Type destinationType, object value)

Parameters

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

Returns

Type: object?

An NpgsqlLine instance.

GetType

csharp
GetType()

ToString

csharp
ToString()

Equals

csharp
Equals()

GetHashCode

csharp
GetHashCode()