LCOV - code coverage report
Current view: top level - dashql-app/src/session/shell - session_shell_catalog.ts Coverage Total Hit
Test: DashQL 915828b Lines: 100.0 % 15 15
Test Date: 2026-11-06 19:30:32

            Line data    Source code
       1              : import { DashQLShell, DashQLShellEnvironment, DashQLShellOptions } from '../../shell/api.js';
       2              : 
       3              : export interface SessionShellCatalog {
       4              :     relationsSql: string;
       5              :     functionsSql: string;
       6              : }
       7              : 
       8            1 : export async function createSessionShell(
       9            1 :     catalog: SessionShellCatalog,
      10            1 :     environment: DashQLShellEnvironment,
      11            1 :     options: Omit<DashQLShellOptions, 'environment'> = {},
      12            1 : ): Promise<DashQLShell> {
      13            1 :     const shell = await DashQLShell.create({ ...options, environment });
      14            1 :     try {
      15            1 :         shell.loadCatalogScript(catalog.relationsSql);
      16            1 :         shell.loadCatalogScript(catalog.functionsSql);
      17            1 :         return shell;
      18            1 :     } catch (error) {
      19            1 :         shell.destroy();
      20            1 :         throw error;
      21            1 :     }
      22            1 : }
        

Generated by: LCOV version 2.0-1