Skip to main content

do_materialize

Function do_materialize 

Source
pub async fn do_materialize(
    _config: &Config,
    tables: &Arc<ArcSwap<TableRegistry>>,
    params: MaterializeParams,
) -> Result<MaterializeResult, MiniAppError>
Expand description

Execute the row_materialize tool.

Selects rows from the target table, projects fields, serialises to the requested format, and writes the result to absolute filesystem path(s).

§Crux constraints enforced here

  1. Absolute path: params.dest is checked with Path::is_absolute() at step (a). Relative paths return MaterializeDestRelative immediately. No sandbox constraint is applied to absolute paths.
  2. SHA-256: every MaterializeFile entry carries a 64-char hex SHA-256 digest, including when dry_run=true.

§Arguments

  • config — server mount configuration.
  • tables — live ArcSwap-wrapped table registry.
  • params — tool parameters.

§Returns

MaterializeResult on success (JSON-serialisable).

§Errors