Table of Contents

Struct SqlIndexedArray<T>

Namespace
LfrlAnvil.Sql.Objects
Assembly
LfrlAnvil.Sql.Core.dll

Represents a collection of indexed SQL expressions.

public readonly struct SqlIndexedArray<T> : IReadOnlyList<SqlIndexed<T>>, IReadOnlyCollection<SqlIndexed<T>>, IEnumerable<SqlIndexed<T>>, IEnumerable where T : class, ISqlColumn

Type Parameters

T

SQL column type.

Implements
Inherited Members

Properties

Count

Gets the number of elements in the collection.

public int Count { get; }

Property Value

int

The number of elements in the collection.

this[int]

Gets the element at the specified index in the read-only list.

public SqlIndexed<T> this[int index] { get; }

Parameters

index int

The zero-based index of the element to get.

Property Value

SqlIndexed<T>

The element at the specified index in the read-only list.

Methods

From(ReadOnlyArray<SqlIndexed<ISqlColumn>>)

Creates a new SqlIndexedArray<T> instance.

[Pure]
public static SqlIndexedArray<T> From(ReadOnlyArray<SqlIndexed<ISqlColumn>> source)

Parameters

source ReadOnlyArray<SqlIndexed<ISqlColumn>>

Source collection.

Returns

SqlIndexedArray<T>

New SqlIndexedArray<T> instance.

Remarks

Be careful while using this method, because it does not actually validate the type's correctness.

GetEnumerator()

Creates a new SqlIndexedArray<T>.Enumerator instance for this array.

[Pure]
public SqlIndexedArray<T>.Enumerator GetEnumerator()

Returns

SqlIndexedArray<T>.Enumerator

New SqlIndexedArray<T>.Enumerator instance.

UnsafeReinterpretAs<TDestination>()

Converts this instance to another type that implements the ISqlColumn interface.

[Pure]
public SqlIndexedArray<TDestination> UnsafeReinterpretAs<TDestination>() where TDestination : class, ISqlColumn

Returns

SqlIndexedArray<TDestination>

New SqlIndexedArray<T> instance.

Type Parameters

TDestination

SQL column type to convert to.

Remarks

Be careful while using this method, because it does not actually validate the type's correctness.