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

    Interface TerminalInterface

    Interface for interacting with the terminal from commands.

    This interface is passed to command handlers and provides methods for writing output and executing SQL.

    interface TerminalInterface {
        clear(): void;
        executeSQL(sql: string): Promise<QueryResult | null>;
        getTheme(): "dark" | "light";
        refreshPrompt(): void;
        setTheme(theme: "dark" | "light"): void;
        write(text: string): void;
        writeln(text: string): void;
    }

    Implemented by

    Index

    Methods

    • Executes a SQL query and returns the result.

      Parameters

      • sql: string

        The SQL statement to execute

      Returns Promise<QueryResult | null>

      The query result, or null if an error occurred