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
intOrdinal of this field.
name
stringName of this field.
isUsed
boolSpecifies whether or not this field is used in a query.
includeTypeNames
boolSpecifies 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
Name
Name of this field.
public string Name { get; }
Property Value
Ordinal
Ordinal of this field.
public int Ordinal { get; }
Property Value
TypeName
Specifies the full type name of this field.
public string? TypeName { get; }
Property Value
TypeNames
Collection of all distinct type names of values associated with this field.
public ReadOnlySpan<string> TypeNames { get; }
Property Value
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
stringType's name.
Returns
- bool
true when type name was added, otherwise false.