Sign in Join
FPDoc Onlineexperiment

TAggregateSum class

In unit fpExprPars

Internally used class for sum aggregate functions

Declaration

pascal
TAggregateSum = class(TAggregateExpr)

Inheritance

  1. TAggregateSum
  2. TAggregateExpr
  3. TFPExprFunction
  4. TFPExprIdentifierNode
  5. TFPExprNode
  6. TObject

Descends from it: TAggregateAvg

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

Methods

ConvertArgumentpublicConvert argument for sum aggregation
InitAggregatepublicInitialize sum aggregation
UpdateAggregatepublicUpdate sum aggregate with new value

Inherited

From TAggregateExpr (2)

GetNodeValue IsAggregate

From TFPExprFunction (8)

ArgumentNodes ArgumentParams AsString CalcParams Check CreateFunction Destroy HasAggregate

From TFPExprIdentifierNode (3)

CreateIdentifier Identifier NodeType

From TFPExprNode (2)

CheckNodeType NodeValue

From TObject (41)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.