PgNativeItemPointer
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Owns or borrows a native PostgreSQL ItemPointerData while copying its fields through selected-version headers.
public sealed class PgNativeItemPointer : IDisposableCreated values own one palloc allocation. Borrowed views never acquire release rights. Checked views share their owner’s invalidation; external raw pointers require an explicit lifetime anchor. Dispose owned values deterministically on the backend thread; no finalizer calls PostgreSQL.
Inheritance: object
Implements: IDisposable
Methods
Section titled “Methods”Borrow()
Section titled “Borrow()”Creates a borrowed view sharing the current owner’s invalidation without acquiring release rights.
public PgNativeItemPointer Borrow()Returns: PgNativeItemPointer
The independently disposable borrowed view.
CloneInto(PgMemoryContext?)
Section titled “CloneInto(PgMemoryContext?)”Copies both fields into independent, individually owned native storage.
public PgNativeItemPointer CloneInto(PgMemoryContext? context = null)Parameters:
context — PgMemoryContext
The destination context, or null for the current context.
Returns: PgNativeItemPointer
The new owner.
Create(PgItemPointer, PgMemoryContext?)
Section titled “Create(PgItemPointer, PgMemoryContext?)”Allocates a native item pointer in a selected context and copies both raw fields, including invalid values.
public static PgNativeItemPointer Create(PgItemPointer value, PgMemoryContext? context = null)Parameters:
value — PgItemPointer
The initial location.
context — PgMemoryContext
The native owner, or null for the current memory context.
Returns: PgNativeItemPointer
The individually disposable owner.
Dispose()
Section titled “Dispose()”Frees individually owned native storage or closes a borrowed view without freeing its referent.
public void Dispose()Native free failures leave ownership intact for retry. Disposing storage already reclaimed by its context is harmless.
Properties
Section titled “Properties”LifetimeContext
Section titled “LifetimeContext”Gets the allocation owner or the external pointer’s explicit lifetime anchor after validating access.
public PgMemoryContext LifetimeContext { get; }Value: PgMemoryContext
Gets or sets a copied location after checking the native allocation or external lifetime anchor.
public PgItemPointer Value { get; set; }Value: PgItemPointer