DuckDB Terminal - v0.2.0
    Preparing search index...

    Interface CommandContext

    Interface for the terminal context needed by command handlers

    interface CommandContext {
        clear: () => void;
        getContinuationPrompt: () => string;
        getDatabase: () => Database;
        getHighlightedSQL: (sql: string) => string;
        getLastQueryResult: () => QueryResult | null;
        getLinkProvider: () => LinkProvider;
        getLoadedFiles: () => Map<string, FileInfo>;
        getOutputMode: () => "table" | "csv" | "json" | "tsv";
        getPageSize: () => number;
        getPrompt: () => string;
        getShowTimer: () => boolean;
        getSyntaxHighlighting: () => boolean;
        getThemeName: () => string;
        loadFile: (file: File) => Promise<void>;
        removeFile: (filename: string) => Promise<void>;
        resetState: () => Promise<void>;
        setOutputMode: (mode: "table" | "csv" | "json" | "tsv") => void;
        setPageSize: (size: number) => void;
        setPrompts: (primary: string, continuation?: string) => void;
        setShowTimer: (enabled: boolean) => void;
        setSyntaxHighlighting: (enabled: boolean) => void;
        setTheme: (theme: "dark" | "light") => void;
        write: (text: string) => void;
        writeln: (text: string) => void;
    }
    Index

    Properties

    clear: () => void

    Clear the terminal

    getContinuationPrompt: () => string

    Get current continuation prompt

    getDatabase: () => Database

    Get the database instance

    getHighlightedSQL: (sql: string) => string

    Get highlighted SQL

    getLastQueryResult: () => QueryResult | null

    Get last query result

    getLinkProvider: () => LinkProvider

    Get link provider

    getLoadedFiles: () => Map<string, FileInfo>

    Get loaded files map

    getOutputMode: () => "table" | "csv" | "json" | "tsv"

    Get current output mode

    getPageSize: () => number

    Get page size

    getPrompt: () => string

    Get current prompt

    getShowTimer: () => boolean

    Get timer status

    getSyntaxHighlighting: () => boolean

    Get syntax highlighting status

    getThemeName: () => string

    Get current theme name

    loadFile: (file: File) => Promise<void>

    Load a file

    removeFile: (filename: string) => Promise<void>

    Remove a loaded file

    resetState: () => Promise<void>

    Reset the terminal state

    setOutputMode: (mode: "table" | "csv" | "json" | "tsv") => void

    Set output mode

    setPageSize: (size: number) => void

    Set page size

    setPrompts: (primary: string, continuation?: string) => void

    Set prompts

    setShowTimer: (enabled: boolean) => void

    Set timer status

    setSyntaxHighlighting: (enabled: boolean) => void

    Set syntax highlighting status

    setTheme: (theme: "dark" | "light") => void

    Set theme

    write: (text: string) => void

    Write text to terminal (no newline)

    writeln: (text: string) => void

    Write text to terminal with newline