Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thebearingedge/vscode-sql-lit
🎨 Syntax highlighting for SQL template literals.
https://github.com/thebearingedge/vscode-sql-lit
Last synced: 28 days ago
JSON representation
🎨 Syntax highlighting for SQL template literals.
- Host: GitHub
- URL: https://github.com/thebearingedge/vscode-sql-lit
- Owner: thebearingedge
- License: mit
- Created: 2020-08-04T04:07:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-16T17:59:53.000Z (over 1 year ago)
- Last Synced: 2024-04-15T02:57:27.406Z (7 months ago)
- Homepage: https://marketplace.visualstudio.com/items?itemName=thebearingedge.vscode-sql-lit
- Size: 1.66 MB
- Stars: 17
- Watchers: 3
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vscode-sql-lit
Syntax highlighting for SQL tagged template literals in JavaScript and TypeScript.
Pairs nicely with the following packages:
- [`postgres`](https://www.npmjs.com/package/postgres)
- [`slonik`](https://www.npmjs.com/package/slonik)
- [`@slonik/typegen`](https://www.npmjs.com/package/@slonik/typegen)
- [`sql-template-strings`](https://www.npmjs.com/package/sql-template-strings)## Main Features
SQL syntax highlighting is triggered in a couple of ways:
- tagged template literals via a `sql*` or `db*` identifier
- a `.sql` or `.db` method invoked as a template tag
- template literal strings with a `/* sql */` or `/* db */` comment prefix## Samples
### Basic Tag
![Basic Tag](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/tagged.png)
### Tag Method
![Tag Method](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/tag-method.png)
### Interpolated Values
![Interpolated Values](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/interpolated.png)
### TypeScript
![Type Argument](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/typed.png)
### PL/PgSQL
![PL/PgSQL](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/plpgsql.png)
### Slonik
![Slonik Methods](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/slonik.png)
### Slonik Typegen
![Slonik Typegen](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/slonik-typegen.png)
### Slonik Validation
![Slonik Validation](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/slonik-zod.png)
### Template Comment Prefix
![Template Comment Prefix](https://github.com/thebearingedge/vscode-sql-lit/raw/master/images/raw-comment-prefixed.png)
## File Types
- .js
- .jsx
- .ts
- .tsx
- .vue## Advanced Language Support
None. This extension only offers syntax highlighting.
Be sure to follow best practices documented in your database driver package of choice to mitigate [sql injection](https://owasp.org/www-community/attacks/SQL_Injection) vulnerabilities!