AskSQL API Reference (core v0.10.0)
    Preparing search index...

    Interface Turn

    interface Turn {
        autoLimited?: boolean;
        collection?: string;
        error?: { code: string; retryable: boolean; userMessage: string };
        explanation?: string;
        id: string;
        phase: TurnPhase;
        plan?: string;
        planning?: boolean;
        question: string;
        result?: ResultSet;
        schemaAnswer?: {
            answer: string;
            grounded: boolean;
            isSchemaChange: boolean;
            proposedSql?: string;
            unknownReferences: string[];
        };
        sql?: string;
        stage?: string;
        streamText?: string;
        suggestedSql?: string;
    }
    Index
    autoLimited?: boolean
    collection?: string

    MongoDB only: the collection sql (an aggregation pipeline) runs against.

    error?: { code: string; retryable: boolean; userMessage: string }
    explanation?: string
    id: string
    phase: TurnPhase
    plan?: string

    EXPLAIN-plan text, populated on demand.

    planning?: boolean
    question: string
    result?: ResultSet
    schemaAnswer?: {
        answer: string;
        grounded: boolean;
        isSchemaChange: boolean;
        proposedSql?: string;
        unknownReferences: string[];
    }

    A grounded plain-language schema answer, when the question wasn't a data query (see answerSchemaQuestions).

    sql?: string
    stage?: string
    streamText?: string

    Raw model output for the stage in flight; unparsed, and dropped once the stage settles.

    suggestedSql?: string

    A corrected query the server suggested after a failed run (apply to retry).