Package net.pricefx.formulaengine.scripting.queryapi
PipelineStage
transformations (joins, filters, aggregations, sorting) reshape the data, and the
stream method executes the query and fetches the result rows.
Entry point: obtained through api.queryApi(); see
PublicGroovyAPI.queryApi(). On the returned
QueryApi, QueryApi.tables() lists the available source tables (master data,
price lists, price grids, rebate data, Analytics Data Sources and Datamarts),
QueryApi.exprs(), QueryApi.orders() and QueryApi.groups() provide
the Expression, ordering and grouping building blocks, and
QueryApi.source(Tables.Table) starts the pipeline.
Contrary to declarative SQL, a query describes a sequence of data transformation stages.
Joins, aggregations and window functions (WindowFunction) have standard SQL
equivalents. Output columns are referred to by their Selectable alias; an unnamed
Expression receives an alias with as(String). The query runs against the
database only when stream is called. The typed table and column descriptors returned
by Tables live in the net.pricefx.formulaengine.scripting.queryapi.tables
subpackage. The Query API is available in all logics and is the recommended way to read data
in new logic, replacing deprecated general purpose query functions such as api.find.
-
InterfacesClassDescriptionAn Expression used to specify either output values or logic criteria of a
PipelineStage.Collection ofExpressionbuilding methodsList of grouping builder to be used inPipelineStage.aggregateByGroups(Function, Function)Represents a list of groupings to be used inPipelineStage.aggregateByGroups(Function, Function)Collection of methods used to specify Orders forPipelineStage.sortBy(Function)stage.The atomic building bock of QueryApi queries.The result type to be consumed by the function given toPipelineStage.stream(Function).A representation of a result row accessible as an immutable map view.QueryAPIAn object which can be part of the output or input of aPipelineStage.An object which represents a QueryApiExpressionand which can be part of the output or input of aPipelineStageas it is alsoSelectableCollection of accessor to Pricefx domain tables asTables.Tableobjects.A representation of a set of columns of a concrete or virtual table.A concrete domain tableWindow function building methods.