Table of Contents

Class SqlQueryExpressionNode

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

Represents an SQL syntax tree expression node that defines a query expression.

public abstract class SqlQueryExpressionNode : SqlExpressionNode, ISqlStatementNode
Inheritance
SqlQueryExpressionNode
Implements
Derived
Inherited Members
Extension Methods

Properties

Selection

Collection of expressions to include in this query's selection.

public abstract ReadOnlyArray<SqlSelectNode> Selection { get; }

Property Value

ReadOnlyArray<SqlSelectNode>

Methods

ExtractKnownDataFieldCount()

Calculates the number of known data fields selected by this query.

[Pure]
protected virtual int ExtractKnownDataFieldCount()

Returns

int

Number of known data fields selected by this query.

ExtractKnownDataFields(SqlRecordSetNode)

Extracts a collection of SqlQueryDataFieldNode instances for all known data fields, identifier by field name.

[Pure]
protected virtual Dictionary<string, SqlQueryDataFieldNode> ExtractKnownDataFields(SqlRecordSetNode recordSet)

Parameters

recordSet SqlRecordSetNode

Record set to attach to all created data field nodes.

Returns

Dictionary<string, SqlQueryDataFieldNode>

New collection of SqlQueryDataFieldNode instances for all known data fields, identifier by field name.

ReduceKnownDataFieldExpressions(Action<KeyValuePair<string, KnownDataFieldInfo>>)

Invokes the provided callback for each known data field in this query.

public virtual void ReduceKnownDataFieldExpressions(Action<KeyValuePair<string, SqlQueryExpressionNode.KnownDataFieldInfo>> callback)

Parameters

callback Action<KeyValuePair<string, SqlQueryExpressionNode.KnownDataFieldInfo>>

Callback to invoke.

TryFindKnownDataFieldInfo(string)

Attempts to find a known data field by the provided name.

[Pure]
protected virtual SqlQueryExpressionNode.KnownDataFieldInfo? TryFindKnownDataFieldInfo(string name)

Parameters

name string

Returns

SqlQueryExpressionNode.KnownDataFieldInfo?

Found SqlQueryExpressionNode.KnownDataFieldInfo instance or null when data field was not found.