Skip to main content

explain_sql

Function explain_sql 

Source
pub fn explain_sql(
    sql: &str,
    backend: Backend,
    analyze: bool,
) -> Result<(String, ExplainOutput, bool), SqlError>
Expand description

Return the EXPLAIN-wrapped SQL, the expected output format, and whether the wrapped SQL contains multiple statements (which requires execute_multi).

When analyze is true and the statement is non-modifying, the backend-specific “actual execution” variant is used. For modifying statements ANALYZE is stripped to avoid side effects.