[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Internally used class for case-when conditional operations
Source position: fpexprpars.pp line 279
type TCaseOperation = class(TFPExprNode) |
||
public |
||
procedure Check; override; |
|
Validate the case operation for correctness |
procedure InitAggregate; override; |
|
Initialize aggregate processing for case operation |
procedure UpdateAggregate; override; |
|
Update aggregate calculations for case operation |
function HasAggregate; override; |
|
Check if case operation contains aggregates |
function NodeType; override; |
|
Get the result type for case operation |
constructor Create(); |
|
Create case operation with arguments |
destructor destroy; override; |
|
Destroy case operation and free resources |
function AsString; override; |
|
Get string representation of case operation |
property Condition: TFPExprNode; [r] |
|
The condition expression of the case operation |
end; |
|
Internally used class for case-when conditional operations |
|
| | | ||
|
Class for representing nodes in expression trees |
|
| | | ||
The TCaseOperation class implements case-when conditional operations in expressions, providing multi-way branching logic based on value matching. It allows for testing a single expression against multiple possible values and executing different branches based on which value matches.
The case operation evaluates a test expression and compares it against a series of when-value pairs, executing the associated expression for the first matching value. If no values match, an optional else expression is evaluated.
The TCaseOperation class enables complex multi-conditional logic within expressions, similar to CASE statements in SQL or switch statements in programming languages, providing an alternative to nested if-then-else constructs.
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.
|
Class for representing nodes in expression trees |