Class SqlInternalRecordSetNode
- Namespace
- LfrlAnvil.Sql.Expressions.Objects
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents an SQL syntax tree node that defines a single record set based on another record set.
public sealed class SqlInternalRecordSetNode : SqlRecordSetNode
- Inheritance
-
SqlInternalRecordSetNode
- Inherited Members
- Extension Methods
Properties
Base
Underlying SqlRecordSetNode instance.
public SqlRecordSetNode Base { get; }
Property Value
Info
SqlRecordSetInfo associated with this record set.
public override SqlRecordSetInfo Info { get; }
Property Value
Methods
As(string)
Creates a new SQL record set node with changed Alias.
[Pure]
public override SqlRecordSetNode As(string alias)
Parameters
alias
stringAlias to set.
Returns
- SqlRecordSetNode
New SQL record set node.
Exceptions
- NotSupportedException
Aliased SqlInternalRecordSetNode instances are not supported.
AsSelf()
Creates a new SQL record set node without an alias.
[Pure]
public override SqlInternalRecordSetNode AsSelf()
Returns
- SqlInternalRecordSetNode
New SQL record set node.
GetField(string)
Returns a data field associated with this record set by its name
.
[Pure]
public override SqlDataFieldNode GetField(string name)
Parameters
name
stringData field's name.
Returns
- SqlDataFieldNode
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 SqlDataFieldNode GetUnsafeField(string name)
Parameters
name
stringData field's name.
Returns
- SqlDataFieldNode
SqlDataFieldNode instance associated with the provided
name
.
MarkAsOptional(bool)
Creates a new SQL record set node with changed IsOptional.
[Pure]
public override SqlInternalRecordSetNode MarkAsOptional(bool optional = true)
Parameters
optional
boolIsOptional value to set. Equal to true by default.
Returns
- SqlInternalRecordSetNode
New SQL record set node.