Skip to content

SpiRawResult

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Owns raw SPI datums in a PostgreSQL memory context until disposal or parent-context cleanup.

public sealed class SpiRawResult : IReadOnlyList<SpiRawRow>, IReadOnlyCollection<SpiRawRow>, IEnumerable<SpiRawRow>, IEnumerable, IDisposable

Use a using declaration inside the backend callback. Copied metadata remains readable after disposal; native datum access does not. No finalizer calls PostgreSQL from a managed worker thread.

Inheritance: object

Implements: IReadOnlyList<SpiRawRow>, IReadOnlyCollection<SpiRawRow>, IEnumerable<SpiRawRow>, IEnumerable, IDisposable

Gets copied column metadata, including for an empty result.

public IReadOnlyList<SpiColumn> Columns { get; }

Value: IReadOnlyList<SpiColumn>

Gets the number of returned rows.

public int Count { get; }

Value: int

Gets a row by zero-based index.

public SpiRawRow this[int index] { get; }

Parameters:

index — int

The row index.

Value: SpiRawRow

The raw row.

Gets the final statement’s processed-row count.

public long RowsAffected { get; }

Value: long

Releases all result datums and invalidates their checked native access.

public void Dispose()

Enumerates rows in result order.

public IEnumerator<SpiRawRow> GetEnumerator()

Returns: IEnumerator<SpiRawRow>

The row enumerator.

Resolves an exact, case-sensitive column name to its zero-based ordinal, including when the query returned no rows. Duplicate names resolve to the first column.

public int GetOrdinal(string name)

Parameters:

name — string

The column name.

Returns: int

The zero-based ordinal.