Skip to content

PgFixedKeyComparer

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Creates deterministic equality comparers for keys in fixed shared-memory dictionaries.

public static class PgFixedKeyComparer

Inheritance: object

Creates a comparer with .NET value equality and process-independent FNV-1a hashes.

public static IEqualityComparer<T> Create<T>() where T : unmanaged

Type parameters:

T

A supported unmanaged key type.

Returns: IEqualityComparer<T>

A comparer suitable for independently attached PostgreSQL processes.

Supported types are Boolean, character, integer primitives, enums, Int128, UInt128, Guid, Half, Single, Double and Decimal. Equivalent NaNs, signed zeros and decimal scales hash identically. Other structs require an explicit stable comparer. Hashes are an implementation detail, not a persistent wire format or a Rust Hash encoding.