PgContextValue<T>
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Holds one checked unmanaged value whose storage is reclaimed by its PostgreSQL context.
public sealed class PgContextValue<T> where T : unmanagedType parameters:
T
The unmanaged representation copied to and from native storage.
This wrapper has no individual disposal or finalizer. Collection of the wrapper never frees native bytes or invokes a value destructor. Unmanaged storage does not establish a C ABI or SQL type.
Inheritance: object
Properties
Section titled “Properties”Alignment
Section titled “Alignment”Gets the requested explicit alignment, or zero for the server default.
public nuint Alignment { get; }Value: nuint
Context
Section titled “Context”Gets the allocation’s actual native owner while the allocation remains live.
public PgMemoryContext Context { get; }Value: PgMemoryContext
Options
Section titled “Options”Gets the original initialization and native size policies.
public PgAllocationOptions Options { get; }Value: PgAllocationOptions
Gets or sets a copied value while its native context and allocation remain live.
public T Value { get; set; }Value: T
Methods
Section titled “Methods”Borrow()
Section titled “Borrow()”Borrows a typed view sharing this value’s checked allocation lifetime.
public PgNativeReference<T> Borrow()Returns: PgNativeReference<T>
A non-owning view.
CloneInto(PgMemoryContext?)
Section titled “CloneInto(PgMemoryContext?)”Copies all representation bytes into independent context-owned storage.
public PgContextValue<T> CloneInto(PgMemoryContext? context = null)Parameters:
context — PgMemoryContext
The destination context, or null for the current context.
Returns: PgContextValue<T>
A shallow context-owned copy with default allocation policies.
CloneOwnedInto(PgMemoryContext?)
Section titled “CloneOwnedInto(PgMemoryContext?)”Copies all representation bytes into independent individually owned storage.
public PgNativeBox<T> CloneOwnedInto(PgMemoryContext? context = null)Parameters:
context — PgMemoryContext
The destination context, or null for the current context.
Returns: PgNativeBox<T>
A shallow individually owned copy with default allocation policies.