Constructor
new ConglomerateRecord(virtualFields)
Parameters:
| Name | Type | Description |
|---|---|---|
virtualFields |
Array.<TableField> |
Members
selectVirtualFields
Properties:
| Type | Description |
|---|---|
| Array.<TableField> |
Methods
calculateFunctionWithAggregates(row) → {void}
- Description:
Updates the 'row' array with calculated field with aggregate functions.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
row |
Array.<any> |
Returns:
- Type
- void
squish(groupRecords) → {Array.<any>}
- Description:
Compress group records to a single row by applying appropriate aggregate functions.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
groupRecords |
Array.<Array.<any>> | a group of table data records to compress. |
Returns:
- compressed record.
- If column is not an aggregate function, value from first row of group records is selected. (should all be the same)
- If column has aggregate function, that function is applied to all rows from group records.
- Type
- Array.<any>
(static) aggregateColumn(field, groupRecords, columnIndex) → {any}
- Description:
Apply aggregate function to all rows on specified column and return result.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
field |
TableField | field with aggregate function |
groupRecords |
Array.<any> | group of records we apply function to. |
columnIndex |
Number | the column index where data is read from and function is applied on. |
Returns:
- value of aggregate function for all group rows.
- Type
- any
(static) aggregateColumnToNumeric(columnData) → {Number}
Parameters:
| Name | Type | Description |
|---|---|---|
columnData |
any |
Returns:
- Type
- Number
(static) createCalculatedFieldObjectForTable(aggTable) → {CalculatedField}
Parameters:
| Name | Type | Description |
|---|---|---|
aggTable |
Table |
Returns:
- Type
- CalculatedField
(static) createMapOfOldFieldToNewField(aggTable, virtualFields) → {Array.<Object>}
Parameters:
| Name | Type | Description |
|---|---|---|
aggTable |
Table | |
virtualFields |
Array.<TableField> |
Returns:
- Type
- Array.<Object>
(static) createTempAggregateTable(row) → {Table}
Parameters:
| Name | Type | Description |
|---|---|---|
row |
Array.<any> |
Returns:
- Type
- Table
(static) replaceFieldNames(calcFunc, mappedField) → {String}
- Description:
Returns an updated 'calcFunc' string, where fields are given different names.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
calcFunc |
String | |
mappedField |
Array.<Object> |
Returns:
- Type
- String