QudsExpressionEngine class
Evaluates ReportExpressions and interpolates ReportTemplateText.
Built-in functions (case-insensitive):
- Aggregates:
SUM COUNT AVG MIN MAX DISTINCTCOUNT FIRST LAST - Arabic:
TAFQEET(amount, 'LYD' [, wrap]),NUMBERWORDS(n [, feminine]) - Words in either language:
AMOUNTWORDS(amount, 'USD' [, 'en' | 'ar']) - Logic:
IF IIF COALESCE NVL ISNULL ISEMPTY AND OR NOT - Math:
ROUND FLOOR CEIL ABS MOD POWER SQRT - Text:
CONCAT UPPER LOWER TRIM LEN LEFT RIGHT SUBSTR REPLACE CONTAINS STARTSWITH ENDSWITH PADLEFT JOIN - Dates:
NOW TODAY DATE YEAR MONTH DAY - Conversion / display:
NUMBER TEXT FORMAT
Constructors
-
QudsExpressionEngine({ReportFormatter formatter = const ReportFormatter(), Map<
String, ReportFunction> ? functions}) - QudsExpressionEngine API.
Properties
- formatter → ReportFormatter
-
formatter API.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
evaluate(
ReportExpression expression, ReportScope scope) → ReportValue - Evaluates a parsed expression.
-
evaluateSource(
String source, ReportScope scope) → ReportValue -
Parses and evaluates
source. -
interpolate(
String template, ReportScope scope) → String -
Expands every
{{ }}placeholder intemplate. -
interpolateParsed(
ReportTemplateText template, ReportScope scope) → String - Expands a pre-parsed template.
-
knowsFunction(
String name) → bool -
True when
nameis a built-in or registered function. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
regionCaptions(
String labelField, String? category, List< ReportValue> rows, ReportScope scope, {ReportShapeLayer? shapes}) → Map<String, String> -
Caption of each category key when
labelFieldis a formula. The first row for a key wins. A failing formula yields an empty caption so the map does not fall back to the region key. -
registerFunction(
String name, ReportFunction function) → void -
Adds a host function (
nameis case-insensitive). -
shapeCaption(
String labelField, ReportShapeFeature feature, ReportShapeLayer layer) → String -
Label of one region from its own columns. Used when the chart's data
set has no row for that region, so
NameandSHAPE_Areastill draw. -
shapeFieldLabels(
{required String field, required ReportShapeLayer layer, required ReportDataSchema schema, ReportRecord? data, String? keyField}) → Map< String, String> ? -
Caption of every region when
fieldis a calculated or stored column of the report rather than an attribute stored in the shape file. Keys are ReportShapeFeature.key. Empty whenfieldis a formula or a real shape attribute. -
toString(
) → String -
A string representation of this object.
inherited
-
valueOf(
ReportTemplateText template, ReportScope scope) → ReportValue -
Value of a single-placeholder template (
{{item.price}}) or the interpolated text otherwise. Exporters use this to keep numbers typed.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isLabelFormula(
String? source) → bool -
True when a map label is a formula. A single column name stays an
attribute lookup.
CONCAT(name, "\n", code)andRow.nameare formulas, as is any{{ }}template. -
isTemplate(
String? source) → bool -
True when
sourceis a{{ }}template rather than a bare name.