Function sql::plan::statement::plan [−][src]
pub fn plan(
pcx: Option<&PlanContext>,
catalog: &dyn SessionCatalog,
stmt: Statement<Raw>,
params: &Params
) -> Result<Plan, Error>
Expand description
Produces a Plan
from the purified statement stmt
.
Planning is a pure, synchronous function and so requires that the provided
stmt
does does not depend on any external state. To purify a statement,
use crate::pure::purify
.
The returned plan is tied to the state of the provided catalog. If the state of the catalog changes after planning, the validity of the plan is not guaranteed.