Table of Contents

Struct SqlResultSetField

Namespace
LfrlAnvil.Sql.Statements
Assembly
LfrlAnvil.Sql.Core.dll

Represents a definition of a result set's field.

public readonly struct SqlResultSetField
Inherited Members

Constructors

SqlResultSetField(int, string, bool, bool)

Creates a new SqlResultSetField instance.

public SqlResultSetField(int ordinal, string name, bool isUsed = true, bool includeTypeNames = false)

Parameters

ordinal int

Ordinal of this field.

name string

Name of this field.

isUsed bool

Specifies whether or not this field is used in a query.

includeTypeNames bool

Specifies whether or not to record type names of values associated with this field.

Properties

IsUsed

Specifies whether or not this field is used in a query.

public bool IsUsed { get; }

Property Value

bool

Name

Name of this field.

public string Name { get; }

Property Value

string

Ordinal

Ordinal of this field.

public int Ordinal { get; }

Property Value

int

TypeName

Specifies the full type name of this field.

public string? TypeName { get; }

Property Value

string

TypeNames

Collection of all distinct type names of values associated with this field.

public ReadOnlySpan<string> TypeNames { get; }

Property Value

ReadOnlySpan<string>

Methods

ToString()

Returns a string representation of this SqlResultSetField instance.

[Pure]
public override string ToString()

Returns

string

String representation.

TryAddTypeName(string?)

Attempts to add a type name.

public bool TryAddTypeName(string? name)

Parameters

name string

Type's name.

Returns

bool

true when type name was added, otherwise false.