Skip to content

SmartMySqlGeometryTypeHandler

Namespace: MJCZone.DapperMatic.TypeMapping.Handlers

Assembly: MJCZone.DapperMatic

Summary

Smart type handler for MySqlGeometry with provider-specific optimization. MySQL/MariaDB: Native MySqlGeometry type (MySql.Data or MySqlConnector) Others: WKT (Well-Known Text) string format for consistency with DDL reverse engineering

Inheritance

Implemented Interfaces:

  • ITypeHandler

public

Contents

Constructors (1) | Methods (6)

Constructors

SmartMySqlGeometryTypeHandler

csharp
SmartMySqlGeometryTypeHandler()

Methods

MethodSummary
SetValueSets the parameter value for a MySqlGeometry. MySQL/MariaDB: Passes geometry directly (provider conv...
ParseParses a database value back to MySqlGeometry. MySQL/MariaDB: Value is already MySqlGeometry from pr...
GetType
ToString
Equals
GetHashCode

SetValue

Sets the parameter value for a MySqlGeometry. MySQL/MariaDB: Passes geometry directly (provider converts MySqlGeometry to native geometry). Other providers: Serializes geometry to WKT string.

csharp
void SetValue(IDbDataParameter parameter, object value)

Parameters

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

Parse

Parses a database value back to MySqlGeometry. MySQL/MariaDB: Value is already MySqlGeometry from provider. Other providers: Deserializes from WKT string.

csharp
object? Parse(Type destinationType, object value)

Parameters

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

Returns

Type: object?

A MySqlGeometry instance.

GetType

csharp
GetType()

ToString

csharp
ToString()

Equals

csharp
Equals()

GetHashCode

csharp
GetHashCode()