Skip to main content

Module ir

Module ir 

Source
Expand description

Intermediate representation for the FHIRPath → SQL compiler.

Two layered IRs:

  • SqlExpr is a dialect-independent value-level expression. Every FHIRPath sub-expression compiles to one of these. The Dialect trait lowers an SqlExpr to a SQL string per backend.
  • PlanNode is the row-source-level plan: scans, lateral unnests, filters, projections, unions, and recursive descents (repeat:).

Stages 2–5 progressively populate the consumers of these types. Stage 1 just defines the shapes so later work has a stable target.

Structs§

Column
Output column projected by a Project node.
JsonPath
Ordered sequence of PathSteps applied to a JSON root.
SubQuery
A subquery embedded inside a SqlExpr. Holds the inner plan together with the scalar projection extracted from each row.

Enums§

BinOp
Binary operator for SqlExpr::BinOp.
BoundaryKind
Source value type for SqlExpr::Boundary.
BoundarySide
Selects between lowBoundary() and highBoundary() semantics.
JsonType
JSON value-type predicate, used by PathStep::TypeFilter and polymorphic-field guards.
LitValue
Literal scalar value embedded directly in SQL.
PathStep
One navigation step in a JsonPath.
PlanNode
Row-source plan node.
SqlExpr
A dialect-independent value-level SQL expression.
SqlType
SQL type tag used by SqlExpr::Cast and column projections.
UnaryOp
Unary operator for SqlExpr::UnaryOp.

Type Aliases§

DialectRef
Boxed dialect handle used by emission helpers.