Class SqlViewDataFieldCollection
Represents a collection of SQL view data fields.
public abstract class SqlViewDataFieldCollection : ISqlViewDataFieldCollection, IReadOnlyCollection<ISqlViewDataField>, IEnumerable<ISqlViewDataField>, IEnumerable
- Inheritance
-
SqlViewDataFieldCollection
- Implements
- Derived
- Inherited Members
Constructors
SqlViewDataFieldCollection(SqlQueryExpressionNode)
Creates a new SqlViewDataFieldCollection instance.
protected SqlViewDataFieldCollection(SqlQueryExpressionNode source)
Parameters
source
SqlQueryExpressionNodeSource query expression.
Properties
Count
Gets the number of elements in the collection.
public int Count { get; }
Property Value
- int
The number of elements in the collection.
View
View that this collection belongs to.
public SqlView View { get; }
Property Value
Methods
Contains(string)
Checks whether or not a data field with the provided name
exists.
[Pure]
public bool Contains(string name)
Parameters
name
stringName to check.
Returns
- bool
true when data field exists, otherwise false.
CreateDataField(string)
Creates a new SqlViewDataField instance.
[Pure]
protected abstract SqlViewDataField CreateDataField(string name)
Parameters
name
stringData field's name.
Returns
- SqlViewDataField
New SqlViewDataField instance.
Get(string)
Returns a data field with the provided name
.
[Pure]
public SqlViewDataField Get(string name)
Parameters
name
stringName of the data field to return.
Returns
- SqlViewDataField
Existing data field.
Exceptions
- KeyNotFoundException
When data field does not exist.
GetEnumerator()
Creates a new SqlObjectEnumerator<T> instance for this collection.
[Pure]
public SqlObjectEnumerator<SqlViewDataField> GetEnumerator()
Returns
- SqlObjectEnumerator<SqlViewDataField>
New SqlObjectEnumerator<T> instance.
TryGet(string)
Attempts to return a data field with the provided name
.
[Pure]
public SqlViewDataField? TryGet(string name)
Parameters
name
stringName of the data field to return.
Returns
- SqlViewDataField
Existing data field or null when data field does not exist.