Unit 'fpexprpars' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TAggregateSum

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internally used class for sum aggregate functions

Declaration

Source position: fpexprpars.pp line 676

type TAggregateSum = class(TAggregateExpr)

public

  function ConvertArgument(); override;

  

Convert argument for sum aggregation

  procedure InitAggregate; override;

  

Initialize sum aggregation

  procedure UpdateAggregate; override;

  

Update sum aggregate with new value

end;

Inheritance

TAggregateSum

  

Internally used class for sum aggregate functions

|

TAggregateExpr

  

Internally used Base class for aggregate expressions

|

TFPExprFunction

  

Internally used class for representing function calls in expression trees

|

TFPExprIdentifierNode

  

Internally used class for identifier nodes in expression trees

|

TFPExprNode

  

Class for representing nodes in expression trees

|

TObject

Description

The TAggregateSum class implements the sum aggregate function, which calculates the total of all processed numeric values. It extends TAggregateExpr to provide summation-specific aggregation logic.

The class maintains an internal accumulator that adds each new value to the running total. It handles different numeric types (integers, floats, currency) and performs appropriate type conversions to maintain precision during the summation process.

The sum function ensures type safety by converting arguments to compatible numeric types before performing addition operations. The final result type depends on the types of values processed during aggregation.

This class is used internally by the TFPExpressionParser class to construct an AST (Abstract Syntax Tree). There is normally no need for you to use or instantiate this class directly.

See also

TFPExprNode

  

Class for representing nodes in expression trees


Documentation generated on: Dec 15 2025