Skip to content

PgAggregateState<T>

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Owns a nonnull managed aggregate payload until its native memory context resets. New unattached wrappers support ordinary managed use; attached wrappers belong to their backend thread.

public sealed class PgAggregateState<T> where T : notnull

Type parameters:

T

The managed payload type, optionally implementing IDisposable for exactly-once cleanup.

Inheritance: object

Takes ownership of a nonnull payload without attaching it to PostgreSQL until returned by an aggregate callback.

public PgAggregateState(T value)

Parameters:

value — T

The payload owned by this wrapper.

Gets the payload while its state remains live, requiring the owning thread after native attachment. The payload is invalidated before disposal when the native owner resets, including error cleanup.

public T Value { get; }

Value: T