Skip to content

SmartNpgsqlBoxTypeHandler

Namespace: MJCZone.DapperMatic.TypeMapping.Handlers

Assembly: MJCZone.DapperMatic

Summary

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

Inheritance

Implemented Interfaces:

  • ITypeHandler

public

Contents

Constructors (1) | Methods (6)

Constructors

SmartNpgsqlBoxTypeHandler

csharp
SmartNpgsqlBoxTypeHandler()

Methods

MethodSummary
SetValueSets the parameter value for a box. PostgreSQL: Passes box directly (Npgsql converts NpgsqlBox to na...
ParseParses a database value back to NpgsqlBox. PostgreSQL: Value is already NpgsqlBox from Npgsql. Other...
GetType
ToString
Equals
GetHashCode

SetValue

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

csharp
void SetValue(IDbDataParameter parameter, object value)

Parameters

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

Parse

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

csharp
object? Parse(Type destinationType, object value)

Parameters

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

Returns

Type: object?

An NpgsqlBox instance.

GetType

csharp
GetType()

ToString

csharp
ToString()

Equals

csharp
Equals()

GetHashCode

csharp
GetHashCode()