Skip to main content

run_file

Function run_file 

Source
pub async fn run_file<S: IntoIterator<Item = Piece>>(
    statements: S,
    run: &mut Run<'_>,
) -> Result<Value>
Expand description

Runs a file of statements, stopping at the first one that fails.

Stopping is not a preference: a statement that failed may well be the one the rest depended on, so carrying on would apply a script whose first half never happened.

This is the whole-answer path, so it gathers the records it produces. The promise that memory does not follow volume is made for a run consumed as a continuous flow, which is stream_file.

ยงErrors

Returns the failure of the first statement that produced one, carrying the position of that statement in the file.