Expand description
SQL-on-FHIR support for storage backends.
The ViewDefinition → SQL pipeline:
ir—PlanNodetree and value types (LitValue,Expr, …).compile_path— FHIRPath expression →Exprlowering.compile_view— ViewDefinition JSON →PlanNode(build_plan).dialect—SqliteDialect/PgDialectimplementations of theDialecttrait (JSON accessors, parameter syntax, etc.).emit—PlanNode→ parameterised SQL (emit_plan).compiler— public façade combiningbuild_plan+emit_planintocompile_view_definition_dialect, the entry point used by the runners.
Backend runners:
sqlite—SqliteInDbRunner(SQL) for SQLite.postgres—PgInDbRunner(SQL) for PostgreSQL.mongodb—MongoInDbRunner(aggregation pipeline) for MongoDB.in_process—InProcessSofRunner, a backend-agnostic runner that evaluates the view with thehelios-sofengine over scanned resources (used by S3 / S3-primary composites, which have no query engine).
Inline resource: parameters on $viewdefinition-run are handled by the
REST layer via the in-process helios-sof FHIRPath evaluator, so this
module does not need a per-backend inline runner.
Modules§
- compile_
path - FHIRPath expression →
SqlExprcompiler. - compile_
view - ViewDefinition JSON →
PlanNodecompiler. - compiler
- ViewDefinition compiler (SQLite/PostgreSQL SQL and MongoDB pipelines).
- dialect
- Dialect trait — token-level SQL emission for PostgreSQL JSONB and SQLite JSON1.
- emit
- Lowers IR (
PlanNode/SqlExpr) to a concrete SQL string for a givenDialect. - emit_
mongo - MongoDB aggregation-pipeline emitter for the SQL-on-FHIR compiler.
- in_
process - Generic in-process SQL-on-FHIR runner.
- ir
- Intermediate representation for the FHIRPath → SQL compiler.
- mongodb
- MongoDB in-DB SQL-on-FHIR runner.
- postgres
- PostgreSQL in-DB SQL-on-FHIR runner.
- sqlite
- SQLite in-DB SQL-on-FHIR runner.
- sqlite_
udfs - SQLite scalar UDFs registered for the in-DB SOF runner.