Documentation Home
MySQL Shell for VS Code


MySQL Shell for VS Code  /  JavaScript  /  Global Functions for JavaScript

Pre-General Availability: 2023-01-18

8.1 Global Functions for JavaScript

The available global functions for JavaScript in DB Notebooks are:

  • print(value: any): void

    Send a value to the output area.

  • runSql(code: string, callback?: (res:IResultSetRow[]) => void), params?: unknown): void

    Run the given query.

  • runSqlIterative(code: string, callback?: (res: IResultSetData) => void, params?: unknown): void

    Run the given query and process the rows iteratively.