File tree Expand file tree Collapse file tree
server/typescript/packages/metadata/src/core/reporting Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,11 +109,6 @@ function defaultClause(measure: MetaData): string {
109109 return typeof declared === "number" ? `; ${ tick ( String ( declared ) ) } when there is nothing to aggregate` : "" ;
110110}
111111
112- /**
113- * A measure in words: the aggregate and its row scope, or the ratio and its null rule. A
114- * `@default` ends either with the value it reads when there is nothing to aggregate; a
115- * defaulted ratio is never null, so its null rule gives way to that clause.
116- */
117112/** R13: an arithmetic expression in words, fully parenthesised below the top so the reading is exact. */
118113function describeExpr ( node : DerivedExprNode , top = true ) : string {
119114 if ( "field" in node ) return tick ( node . field ) ;
@@ -124,6 +119,12 @@ function describeExpr(node: DerivedExprNode, top = true): string {
124119 return top ? text : `(${ text } )` ;
125120}
126121
122+ /**
123+ * A measure in words: the aggregate and its row scope, the ratio and its null rule, or (R13) the
124+ * derived measure's arithmetic. A `@default` ends an aggregate or ratio with the value it reads
125+ * when there is nothing to aggregate; a defaulted ratio is never null, so its null rule gives way
126+ * to that clause.
127+ */
127128export function describeMeasure ( measure : MetaData ) : string {
128129 if ( measure . subType === MEASURE_SUBTYPE_DERIVED ) {
129130 const expr = measure . attr ( REPORTING_ATTR_EXPR ) ;
You can’t perform that action at this time.
0 commit comments