public PropertyReference(string col, string path, int line, int charPositionInLine)
{
Line = line;
Character = charPositionInLine;
Collection = col;
Path = path;
IsAggregate = false;
if (path.EndsWith("COUNT", StringComparison.Ordinal))
{
IsAggregate = true;
AggregateType = AggregateTypes.Count;
Alias = col + "_count";
}
else if (path.EndsWith("SUM", StringComparison.Ordinal))
{
IsAggregate = true;
AggregateType = AggregateTypes.Sum;
Alias = col + "_sum";
}
else if (path.EndsWith("AVG", StringComparison.Ordinal))
{
IsAggregate = true;
AggregateType = AggregateTypes.Average;
Alias = col + "_avg";
}
}