public override void ExitIntrinsic_aggregate([NotNull] MsdsParser.Intrinsic_aggregateContext context) { var component = _components.Get(context.component())[0]; var data = new { schema = SchemaProvider.Value, componentName = component.ComponentName, characteristicName = component.CharacteristicName, characteristicIds = context.characteristicids()?.ID().Select(x => x.GetText()), operation = context.AGGREGATE().GetText().ToUpper(), tables = AssembleChildComponents(context).Select(x => x.ComponentName).Distinct().ToList(), tableSuffix = _tableSuffix, sqlwhere = _sql.Get(context.condition()) }; var ruleSql = _engine.Generate("IntrinsicAggregate", data); _sql.Put(context, ruleSql); _tableSuffix = string.Empty; }
public override void EnterIntrinsic_aggregate([NotNull] MsdsParser.Intrinsic_aggregateContext context) { _temporary++; _tableSuffix = $"_{_temporary}"; }