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, IDisposableUse 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
Properties
Section titled “Properties”Columns
Section titled “Columns”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
this[int]
Section titled “this[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.
RowsAffected
Section titled “RowsAffected”Gets the final statement’s processed-row count.
public long RowsAffected { get; }Value: long
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Releases all result datums and invalidates their checked native access.
public void Dispose()GetEnumerator()
Section titled “GetEnumerator()”Enumerates rows in result order.
public IEnumerator<SpiRawRow> GetEnumerator()Returns: IEnumerator<SpiRawRow>
The row enumerator.
GetOrdinal(string)
Section titled “GetOrdinal(string)”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.