Interface Tables.Columns

All Superinterfaces:
Map<String,SelectableExpression>
All Known Subinterfaces:
ClicColumns, ClicColumns.InputColumns, ClicColumns.OutputColumns, InternalTable, PersistedObjectColumns, QapiCalculationGridLineItem, QapiCompanyParameterRow, QapiCompensationLineItem, QapiCompensationRecord, QapiConditionRecord, QapiContractLineItem, QapiCustomer, QapiCustomerExtensionRow, QapiPriceGridLineItem, QapiPriceListLineItem, QapiProduct, QapiProductExtensionRow, QapiQuoteLineItem, QapiRebateLineItem, QapiRebateRecord, QapiSeller, QapiSellerExtensionRow, Tables.Table
Enclosing interface:
Tables

public static interface Tables.Columns extends Map<String,SelectableExpression>
A representation of a set of columns of a concrete or virtual table.

Columns are represented as SelectableExpression and can be accessed by their alias (aka name).
As it's a Map<String, SelectableExpression> groovy . operator can be used to access its values.

For example, let's say that the product master table has been configured with attribute1 labeled as "Cost". This column can be referred and fetched like follows:


 def qapi = api.queryApi()
 def p = qapi.tables().products()
 return qapi.source(
     p,
     [p.Cost] // could be p["Cost"] or p.get("Cost")
 ).stream { it.sum { row -> row.Cost } } // could be row["Cost"] or row.get("Cost")
 
Since:
14.0 - Caribou Lou