Skip to content

TAggregateExpr

Internally used Base class for aggregate expressions

Declaration

Source position: fpexprpars.pp line 646

type

  TAggregateExpr = class(TFPExprFunction)
  public
    class function IsAggregate : Boolean;
    procedure GetNodeValue;
  end;

Description

This abstract base class provides the foundation for all aggregate expression classes in the expression parser. Aggregate expressions perform calculations over multiple values, such as sums, averages, counts, minimums, and maximums.

The class extends TFPExprNode to provide aggregate-specific functionality including initialization and update methods that are called as values are processed. Derived classes must implement the specific aggregation logic for their particular operation.

Aggregate expressions typically maintain internal state that accumulates as values are processed, making them stateful unlike regular expression nodes. The aggregation process involves initialization, iterative updates, and final value calculation.

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.

Methods

Member Visibility Description
GetNodeValue public Get the aggregate expression value
IsAggregate public Check if expression is an aggregate
See all Methods

See also

Name Description
TFPExprNode Class for representing nodes in expression trees