Skip to content

src/dazzle_back/runtime/computed_evaluator.py

Generated: 2026-03-30T04:38:47.030844+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Computed field evaluator for DNR runtime.

This module evaluates computed expressions at runtime. Computed fields are derived values calculated from other fields using aggregate functions and arithmetic operations.

Key Exports

  • evaluate_expression
  • evaluate_computed_fields
  • enrich_record_with_computed_fields
  • enrich_records_with_computed_fields

Dependencies

Imports

  • __future__.annotations
  • datetime.date
  • datetime.datetime
  • decimal.Decimal
  • typing.TYPE_CHECKING
  • typing.Any
  • dazzle_back.specs.entity.AggregateFunctionKind
  • dazzle_back.specs.entity.ArithmeticOperatorKind
  • dazzle_back.specs.entity.ComputedExprSpec
  • dazzle_back.specs.entity.ComputedFieldSpec

Event Interactions

None detected.

Invariants and Assumptions

  • Note: must check datetime before date since datetime is a subclass of date

Tests

  • tests/unit/test_computed_evaluator.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.