Skip to content

Latest commit

Β 

History

History
77 lines (42 loc) Β· 6.43 KB

markdown-sql-tools.md

File metadata and controls

77 lines (42 loc) Β· 6.43 KB

Markdown SQL Pro Tools

Markdown SQL Pro Tools extension adds custom SQL Code Lenses to SQL code blocks in standard SQL and various markdown documents in VS Code IDE.

The provided SQL Code Lenses include top-level SQL and markdown document Execute All, Select All, Extract All, Bookmark All SQL code lenses, Execute, Select, and Copy SQL code block lenses, and Create New SQL document from SQL code block lens.

Our SQL Code Lenses integrate with the popular SQL Tools Connections manager, supported SQL Tools drivers, and query results viewer to execute SQL directly on any of the supported SQL Tools database management systems and view results.

Markdown SQL Pro Tools

Markdown SQL Features

Markdown SQL Pro Tools add the following top-level SQL Code Lenses to SQL and markdown documents open in VS Code IDE:

  • Execute All SQL code lens to execute all SQL statements in the open SQL or markdown document
  • Select All SQL code lens to select all SQL code blocks in the open markdown document
  • Extract All SQL code lens to extract all SQL code blocks from the open markdown document
  • Bookmark All SQL code lens to bookmark all SQL code blocks in the open markdown document

This extension also adds the following SQL Code Lenses to individual SQL code blocks in the open markdown documents and SQL statements in SQL documents:

  • Execute SQL code lens to run SQL code using active SQL Tools database connection
  • Select SQL code lens to select SQL code block in the open SQL or markdown document editor
  • Copy SQL code lens to copy SQL code block to the clipboard
  • Create SQL code lens to create new SQL document from SQL code block in the open text editor

Supported Markdown Documents and SQL Highlights

Markdown SQL Pro Tools detect and highlight SQL code blocks in stanadard .md markdown documents, .Rmd R markdown documents, .qmd Quarto publishing documents, .ojs and .omd Observable JS and markdown documents.

The supported SQL code blocks include code fences with sql tag, %%sql magic code blocks, and %sql magic code lines with SELECT statements.

Markdown SQL Code Highlights

You can use new top-level Select All SQL code lens to select all detected SQL code blocks in the open markdown document.

Markdown SQL Code Selections

Markdown SQL Code Bookmarks

Users of the popular Bookmarks VS Code extension can use new top-level Bookmark All SQL code lens to toggle SQL code bookmarks in the open markdown documents.

Markdown SQL Code Bookmarks

Using Markdown SQL Pro Tools with new SQL Bookmarks, SQLite and our DuckDB Pro SQL Tools in VS Code IDE on Ploomber's JupySQL Jupyter book markdown docs:

Using Markdown SQL Code Bookmarks

Note: Install Bookmarks extension separately to see new Bookmark All SQL code lens enabled in the supported markdown documents.

Interactive SQL in Quarto Docs

The Markdown SQL Pro Tools v1.2.0 and above add SQL Code Lenses to SQL code blocks in Quarto markdown docs in VS Code IDE.

Quick demo of setting up local HR SQLite database with SQL Tools VS Code extension, rendering Quarto markdown document with Quarto extension, and using our new SQL code lenses to Execute SQL queries from standard .md and .qmd markdown documents code:

Interactive SQL in Quarto Docs

You can install and use Interactive SQL Quarto extension to experiment with it in VS Code with Quarto markdown docs.

Interactive SQL in R Markdown

You can also use new SQL Code Lenses in R Markdown documents in VS Code IDE.

SQL in RMD GitHub repository provides a great example of using SQL code chunks in R markdown documents.

Setting up demo SQLite database connection and using our SQL Code Lenses to run SQL queries from R markdown document:

Interactive SQL in R Markdown

Markdown SQL Feature Contributions

Markdown SQL Pro Tools contribute the following Commands and Activation Events to VS Code IDE for working with SQL code in markdown and SQL documents.

Markdown SQL Pro Tools Feature Contributions

Markdodown SQL Pro Tools extension is available under the new Markdown Sql Pro Tools monthly sponsor subscription on GitHub and also includes access to the DuckDB Pro SQL Tools plugin and PRQL Code Lens extension from our Premium Pro Data Tools extensions pack.