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

      DuckDB Terminal - v0.4.2

      DuckDB Terminal - Library Entry Point

      This module provides the main entry point for embedding a DuckDB-powered SQL terminal in web applications. It exports factory functions for creating terminals, as well as all necessary types and utilities.

      import { createTerminal } from 'duckdb-terminal';

      const terminal = await createTerminal({
      container: '#terminal',
      theme: 'dark',
      });

      // Execute SQL programmatically
      const result = await terminal.executeSQL('SELECT 1 + 1 as answer');
      console.log(result); // { columns: ['answer'], rows: [[2]], rowCount: 1, duration: 5 }
      import { createTerminal } from 'duckdb-terminal';

      const terminal = await createTerminal({
      container: document.getElementById('terminal'),
      theme: 'dark',
      });

      terminal.on('queryEnd', ({ sql, result, duration }) => {
      console.log(`Query completed in ${duration}ms`);
      });

      Classes

      AIClientError
      Database
      DuckDBTerminal
      HistoryStore
      InputBuffer
      LinkProvider
      PaginationHandler
      SharingModal
      TerminalAdapter

      Interfaces

      AIProvider
      AISettings
      Command
      CommandContext
      DuckDBToken
      PaginationContext
      PaginationState
      ShareableQuery
      ShareableURLResult
      SharingModalConfig
      SharingModalEvents
      SQLError
      SQLToken
      TerminalConfig
      TerminalEvents
      TerminalInterface
      Theme
      ThemeColors

      Type Aliases

      CommandHandler
      SharingModalState
      TerminalEventListener

      Variables

      BOLD
      darkTheme
      DIM
      FG_BLUE
      FG_CYAN
      FG_GREEN
      FG_RED
      FG_WHITE
      FG_YELLOW
      lightTheme
      MAX_URL_LENGTH
      RESET

      Functions

      bold
      calculateURLLength
      checkProxyAvailable
      clearAISettings
      clearShareableURL
      colorize
      containsURL
      copyToClipboard
      createCommands
      createTerminal
      decodeQueryFromURL
      dim
      embed
      encodeQueryForURL
      extractURLs
      fetchProviders
      formatCSV
      formatJSON
      formatTable
      formatTSV
      generateShareableURL
      generateSQL
      getAISettings
      getBaseShareURL
      getDefaultEndpoint
      getDefaultProvider
      getEncodedQueryLength
      getSavedTheme
      getTheme
      highlightSQL
      isClipboardAvailable
      isSQLComplete
      isValidURL
      linkifyText
      parseShareableURL
      readFromClipboard
      saveAISettings
      saveTheme
      wouldExceedLimit