public override void ExitIntrinsic_aggregatecount([NotNull] MsdsParser.Intrinsic_aggregatecountContext context) { var componentName = context.componentid().ID().GetText(); if (context.characteristicids() != null) { var tmpComponents = new List <Component>(); tmpComponents.AddRange(context.characteristicids().ID().Select(x => new Component(componentName, x.GetText()))); _components.Put(context, tmpComponents); } var components = AssembleChildComponents(context); var data = new { schema = SchemaProvider.Value, componentName, characteristicIds = context.characteristicids()?.ID().Select(x => x.GetText()), tableSuffix = _tableSuffix, tables = AssembleChildComponents(context).Select(x => x.ComponentName).Distinct().ToList(), sqlwhere = _sql.Get(context.condition()) }; var ruleSql = _engine.Generate("IntrinsicCount", data); _sql.Put(context, ruleSql); _tableSuffix = string.Empty; }
public override void EnterIntrinsic_aggregatecount([NotNull] MsdsParser.Intrinsic_aggregatecountContext context) { _temporary++; _tableSuffix = $"_{_temporary}"; }