pub fn main_query(
action_plan: &ActionPlan,
config: &AppConfig,
dialect: &dyn SqlDialect,
method: &str,
path: &str,
role: Option<&str>,
headers_json: Option<&str>,
cookies_json: Option<&str>,
claims_json: Option<&str>,
) -> MainQueryExpand description
Build all queries for an API request.
Routes the ActionPlan to the appropriate statement builder and assembles
the full query bundle including session variables and pre-request calls.
§Behaviour
ActionPlan::Db(DbCrud { .. })routes tomain_read,main_write, ormain_calldepending on theCrudPlanvariantActionPlan::Db(MayUseDb(InspectPlan))generates a schema inspection query (not yet implemented — placeholder for future phases)ActionPlan::NoDb(InfoPlan)generates no SQL (handled at the HTTP layer)
§Returns
A MainQuery with the session setup, pre-request, and main query SQL.