Skip to main content

plan

Function plan 

Source
pub fn plan(
    routine: &str,
    database: Option<&str>,
    declared: &[Parameter],
    asked: &[String],
    values: &[String],
) -> Result<Planned>
Expand description

Places a session variable at each named output and a marker at the rest.

§Why the caller’s values fill only the other positions

An output parameter carries nothing in, so a value written for it would have nowhere to go. The values therefore fill the positions that are not outputs, in the order they were written, and the manual says so.

§Why the variable is numbered and not named

The name comes from the caller and a name pasted into a statement is the one thing this module refuses to do. The position is the product’s own number, so the variable cannot be steered from outside.

§Errors

Returns a validation failure naming a parameter the routine does not declare as an output, raised before anything is sent.