Skip to content

IPgSerializableAggregate<TState>

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Transports internal aggregate state between PostgreSQL processes.

public interface IPgSerializableAggregate<TState>

Type parameters:

TState

The internal state representation.

Restores state with the temporary owner supplied by PostgreSQL.

public static abstract TState Deserialize(PgAggregateContext context, byte[] bytes)

Parameters:

context — PgAggregateContext

The current invocation and temporary state owner.

bytes — byte[]

The serialized state.

Returns: TState

The restored state.

Encodes state into a process-independent byte sequence.

public static abstract byte[]? Serialize(PgAggregateContext context, TState state)

Parameters:

context — PgAggregateContext

The current aggregate invocation.

state — TState

The state to encode.

Returns: byte[]

The serialized state, without process-local pointers, or SQL NULL for an absent partial state.