Class SqlDataSourceNode
- Namespace
- LfrlAnvil.Sql.Expressions.Objects
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents an SQL syntax tree node that defines a single data source.
public abstract class SqlDataSourceNode : SqlNodeBase
- Inheritance
-
SqlDataSourceNode
- Derived
- Inherited Members
- Extension Methods
Constructors
SqlDataSourceNode(Chain<SqlTraitNode>)
Creates a new SqlDataSourceNode instance.
protected SqlDataSourceNode(Chain<SqlTraitNode> traits)
Parameters
traits
Chain<SqlTraitNode>Collection of decorating traits.
Properties
From
First SqlRecordSetNode instance from which this data source's definition begins.
public abstract SqlRecordSetNode From { get; }
Property Value
this[string]
Gets a record set associated with this data source by its identifier.
public SqlRecordSetNode this[string recordSetIdentifier] { get; }
Parameters
recordSetIdentifier
stringRecord set's Identifier.
Property Value
Exceptions
- KeyNotFoundException
When record set does not exist.
Joins
Sequential collection of all SqlDataSourceJoinOnNode instances that define this data source.
public abstract ReadOnlyArray<SqlDataSourceJoinOnNode> Joins { get; }
Property Value
RecordSets
Collection of all record sets contained by this data source.
public abstract IReadOnlyCollection<SqlRecordSetNode> RecordSets { get; }
Property Value
Traits
Collection of decorating traits.
public Chain<SqlTraitNode> Traits { get; }
Property Value
Methods
AddTrait(SqlTraitNode)
Creates a new SQL data source syntax tree node by adding a new trait
.
[Pure]
public virtual SqlDataSourceNode AddTrait(SqlTraitNode trait)
Parameters
trait
SqlTraitNodeTrait to add.
Returns
- SqlDataSourceNode
New SQL data source syntax tree node.
GetRecordSet(string)
Returns a record set associated with this data source by its identifier
.
[Pure]
public abstract SqlRecordSetNode GetRecordSet(string identifier)
Parameters
identifier
stringRecord set's Identifier.
Returns
- SqlRecordSetNode
SqlRecordSetNode instance associated with the provided
identifier
.
Exceptions
- KeyNotFoundException
When record set does not exist.
SetTraits(Chain<SqlTraitNode>)
Creates a new SQL data source syntax tree node by changing the Traits collection.
[Pure]
public abstract SqlDataSourceNode SetTraits(Chain<SqlTraitNode> traits)
Parameters
traits
Chain<SqlTraitNode>Collection of traits to set.
Returns
- SqlDataSourceNode
New SQL data source syntax tree node.