Detect whether addtotals was called row-wise or column-wise.
The addtotals command is an SPL command that has different behavior depending on whether or not the row option passed to it is true or the column option passed to it is true. In the first case, the command adds the fields in an event and creates a new total field for each event. In the second it sums the values of each field across events and creates a new event containing the totals. The default is to sum row-wise. These two cases fall into distinct categories, this is why this detection is necessary.
If it is called row-wise, then the string “addtotals row” is returned, which can be used to look up the corresponding category in the categories dictionary in this module. Otherwise, “addtotals col” is returned, which can be used similarly.
Parameters: | stagenode (ParseTreeNode) – The parsetree node of role “STAGE” that has a command to lookup |
---|---|
Return type: | str |
Detect whether the given string represents a True or False.
Parameters: | astring (str) – The string to detect the truth value of |
---|---|
Return type: | bool |