Generates AI-powered plain-language explanations for SQL queries.
Supports explaining a full query or a selected fragment in context of the full query.
Summary
Functions
Generate a plain-language explanation for a SQL query or fragment.
Functions
Generate a plain-language explanation for a SQL query or fragment.
Options
:sql(required) - The full SQL query:fragment(optional) - A selected portion of the query to explain:data_source(required) - Name of the data source:api_key(required) - API key for the LLM provider:temperature(optional) - LLM temperature (default:0.2)
Returns
{:ok, result}- Map with:explanation,:model, and:usage{:error, term}- Error tuple