Skip to main content

render_procedure_as

Function render_procedure_as 

Source
pub fn render_procedure_as(form: ProcedureForm, routine: &RoutineSpec) -> String
Expand description

Spell this procedure in a named grammar.

The grammar a dialect is nearly the same as, written out, so a dialect that answers ProcedureForm::Custom can start from it and say what differs instead of writing a CREATE from nothing.

Parameters:

  • form: the grammar to spell it in. Custom is not an error to pass — it answers with the agnostic form under a comment naming the grammar, so a fallback branch that reaches here gets something to read. ClickHouse and Databricks do the same, because neither deploys a procedure as SQL;
  • routine: the procedure, in the shape a Custom dialect receives it.