Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Tidb | 33,721 | 68 | 101 | a day ago | 1,289 | April 07, 2022 | 3,877 | apache-2.0 | Go | |
TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial | ||||||||||
Metabase | 31,887 | a day ago | 1 | June 08, 2022 | 2,776 | other | Clojure | |||
The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum: | ||||||||||
Dbeaver | 31,315 | a day ago | 1,782 | apache-2.0 | Java | |||||
Free universal database tool and SQL client | ||||||||||
Redash | 22,871 | 3 days ago | 2 | May 05, 2020 | 773 | bsd-2-clause | Python | |||
Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data. | ||||||||||
Directus | 20,786 | 50 | a day ago | 55 | September 22, 2022 | 360 | gpl-3.0 | TypeScript | ||
The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database. | ||||||||||
Shardingsphere | 18,166 | 8 | a day ago | 7 | June 04, 2020 | 593 | apache-2.0 | Java | ||
Ecosystem to transform any database into a distributed database system, and enhance it with sharding, elastic scaling, encryption features & more | ||||||||||
Knex | 17,370 | 18,096 | 2,788 | a day ago | 248 | August 31, 2022 | 807 | mit | JavaScript | |
A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use. | ||||||||||
Cube | 14,809 | a day ago | 752 | other | Rust | |||||
📊 Cube — The Semantic Layer for Building Data Applications | ||||||||||
Dolt | 14,470 | 2 | a day ago | 214 | May 19, 2022 | 266 | apache-2.0 | Go | ||
Dolt – Git for Data | ||||||||||
Mysql | 13,165 | 4,892 | 7,815 | 2 days ago | 49 | March 25, 2022 | 106 | mpl-2.0 | Go | |
Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package |
Also available in Open VSX Registry
Highlight and lint inline SQL strings. Supported languages are Python, Go, JavaScript, TypeScript, Ruby, Java, C#, Rust, PHP, Lua.
Syntax highlighting works for strings starting with --sql
or any of
the SELECT
, INSERT
, INTO
, DELETE
, UPDATE
, CREATE TABLE
.
Also works with ES6 Template Strings:
const query = sql`
select * from book;
`;
Linting and diagnostics powered entirely by awesome
joereynolds/sql-lint and works for
multiline strings that start with either `--sql
(backtick followed by --sql
),
"--sql
or """--sql
.
jwhitaker-swiftnav |
Connor Bren |
Ferenc Tams |
Gunnar Sv Sigurbjrnsson |
Jon Wolfe |
Titouan CREACH |
The proper way to sanitize data for insertion into your database is to use placeholders for all variables to be inserted into your SQL strings. In other words, NEVER do this (Python example):
query = f"INSERT INTO foo (bar, baz) VALUES ( {variable1}, {variable2} )";
Instead, use $
placeholders (or ?
in some databases):
query = "INSERT INTO foo (bar, baz) VALUES ( $1, $2 )";
And then pass the variables to be replaced when you execute the query. For example with pgx (Go example):
err = conn.QueryRow(
context.Background(),
"select name, weight from widgets where id=$1",
42,
).Scan(&name, &weight)
Integration with real database is available and controlled through VSCode options:
{
"inlineSQL.enableDBIntegration": true,
"inlineSQL.dbDriver": "postgres",
"inlineSQL.dbHost": "localhost",
"inlineSQL.dbPort": 5432,
"inlineSQL.dbUser": "postgres",
"inlineSQL.dbPassword": "postgres"
}
Python | JavaScript/TypeScript |
![]() |
![]() |
Ruby | Java |
![]() |
![]() |
Highlighting does not work with semantic token highlighting enabled (feature provided by some LSP servers).
Currently gopls semantic token highlighting (option gopls.ui.semanticTokens
- off by default)
overrides extension's syntax.
{
"gopls.ui.semanticTokens": false
}
{
"rust-analyzer.highlighting.strings": false
}
C#
{
"csharp.semanticHighlighting.enabled": false
}
This small extension is meant to help those who don't use ORM and don't like SQL builders like squirrel, but still want inline sql in their code to be something more than magic strings, helping to avoid small bugs and typos almost instantly.