Struct DuckDbStruct
.NET representation of an instance of a structure type from DuckDB, where the member values are boxed.
Implements
Inherited Members
Namespace: Mallard.Types
Assembly: Mallard.dll
Syntax
public readonly struct DuckDbStruct : ITuple
Remarks
This representation is inefficient because of the boxing, but avoids generics (of arbitrary arity).
Instances of this type are intended to be immutable (once created), but if the type of a member
is a reference type, or a mutable value type (i.e. not readonly
in C#), user code may
be able to mutate the member value through the object reference that is made available
(even in safe code). It is, obviously, highly discouraged to do so, but no direct memory
corruption will occur should that be attempted.
Properties
| Edit this page View Sourcethis[int]
Get a member of the structure by its index.
Declaration
public object? this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the member, in the range from 0 (inclusive) to Length (exclusive). |
Property Value
Type | Description |
---|---|
object | The value of the member, boxed/casted to object. |
Length
The number of members in the structure.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceToImmutableArray()
Get the values of the members of the structure as an immutable array of boxed objects.
Declaration
public ImmutableArray<object?> ToImmutableArray()
Returns
Type | Description |
---|---|
ImmutableArray<object> |