13 private readonly
IElement[] aggregates;
15 private readonly Dictionary<string, object> groupedValues =
new Dictionary<string, object>();
16 private readonly
int groupCount;
33 this.groupCount = GroupNames.
Length;
34 if (GroupByValues.Length !=
this.groupCount)
35 throw new ArgumentException(
"Length mismatch.", nameof(GroupByValues));
41 for (i = 0; i < this.groupCount; i++)
48 Name = Ref.VariableName;
55 if (!
string.IsNullOrEmpty(Name))
56 this.groupedValues[Name] = GroupByValues[i];
65 public object this[
string Name]
69 if (this.groupedValues.TryGetValue(Name, out
object Value))
71 else if (this.variables.TryGetVariable(Name, out
Variable v))
79 this.groupedValues[Name] = value;
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
override string ToString()
abstract IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
Represents a variable reference.
Represents a collection of objects grouped together useing a GROUP BY construct.
GroupObject(object[] GroupByValues, IElement[] Aggregates, ScriptNode[] GroupNames, Variables Variables)
Represents a collection of objects grouped together useing a GROUP BY construct.
IElement[] Aggregates
Aggregates calculated for the group.
Contains information about a variable.
Basic interface for all types of elements.