Table of Contents

Class SqlRawRecordSetNode

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

Represents an SQL syntax tree node that defines a single record set without a source.

public class SqlRawRecordSetNode : SqlRecordSetNode
Inheritance
SqlRawRecordSetNode
Inherited Members
Extension Methods

Constructors

SqlRawRecordSetNode(SqlRecordSetInfo, string?, bool)

Creates a new SqlRawRecordSetNode instance.

protected SqlRawRecordSetNode(SqlRecordSetInfo info, string? alias, bool isOptional)

Parameters

info SqlRecordSetInfo

SqlRecordSetInfo associated with this record set.

alias string

Optional alias of this record set.

isOptional bool

Specifies whether or not this record set is marked as optional.

SqlRawRecordSetNode(string, string?, bool)

Creates a new SqlRawRecordSetNode instance marked as raw.

protected SqlRawRecordSetNode(string name, string? alias, bool isOptional)

Parameters

name string

Raw name of this record set.

alias string

Optional alias of this record set.

isOptional bool

Specifies whether or not this record set is marked as optional.

Properties

Info

SqlRecordSetInfo associated with this record set.

public override sealed SqlRecordSetInfo Info { get; }

Property Value

SqlRecordSetInfo

IsInfoRaw

Specifies whether or not this record set has been created with a string name rather than SqlRecordSetInfo.

public bool IsInfoRaw { get; }

Property Value

bool

this[string]

Gets a data field associated with this record set by its name.

public SqlRawDataFieldNode this[string fieldName] { get; }

Parameters

fieldName string

Name of the data field to get.

Property Value

SqlRawDataFieldNode

Exceptions

KeyNotFoundException

When data field does not exist.

Methods

As(string)

Creates a new SQL record set node with changed Alias.

[Pure]
public override SqlRawRecordSetNode As(string alias)

Parameters

alias string

Alias to set.

Returns

SqlRawRecordSetNode

New SQL record set node.

AsSelf()

Creates a new SQL record set node without an alias.

[Pure]
public override SqlRawRecordSetNode AsSelf()

Returns

SqlRawRecordSetNode

New SQL record set node.

GetField(string)

Returns a data field associated with this record set by its name.

[Pure]
public override SqlRawDataFieldNode GetField(string name)

Parameters

name string

Data field's name.

Returns

SqlRawDataFieldNode

SqlDataFieldNode instance associated with the provided name.

Exceptions

KeyNotFoundException

When data field does not exist.

GetKnownFields()

Returns a collection of all known data fields that belong to this record set.

[Pure]
public override IReadOnlyCollection<SqlDataFieldNode> GetKnownFields()

Returns

IReadOnlyCollection<SqlDataFieldNode>

Collection of all known data fields that belong to this record set.

GetUnsafeField(string)

Returns an unsafe data field associated with this record set by its name. If a known data field by the provided name does not exist, then a new SqlRawDataFieldNode instance will be returned instead.

[Pure]
public override SqlRawDataFieldNode GetUnsafeField(string name)

Parameters

name string

Data field's name.

Returns

SqlRawDataFieldNode

SqlDataFieldNode instance associated with the provided name.

MarkAsOptional(bool)

Creates a new SQL record set node with changed IsOptional.

[Pure]
public override SqlRawRecordSetNode MarkAsOptional(bool optional = true)

Parameters

optional bool

IsOptional value to set. Equal to true by default.

Returns

SqlRawRecordSetNode

New SQL record set node.