Table of Contents
This chapter provides examples for common tasks in
MySQL Shell for VS Code using TypeScript. You can run the examples after
executing the \ts
command in DB Notebooks.
Database samples used in this chapter are:
To set the active schema from a DB Notebook editor, switch to SQL
mode (\sql) and execute the
USE
statement.
sql> USE sakila
Press Ctrl+Enter to process each statement or command.
TypeScript notes
You do not need to have TypeScript installed as it is provided in the browser environment.
TypeScript is used in two places; to build the application (by transpiling the TypeScript code and JavaScript code), and as a language in MySQL Shell for VS Code.
Monaco-typescript comes with a TypeScript support library, which enables transpiling TypeScript in memory before executing it as JavaScript.