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: about 1 month 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 (almost 2 years ago)
- Last Synced: 2024-11-11T09:47:25.369Z (3 months ago)
- Homepage: https://marketplace.visualstudio.com/items?itemName=thebearingedge.vscode-sql-lit
- Size: 1.66 MB
- Stars: 18
- Watchers: 3
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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

### Tag Method

### Interpolated Values

### TypeScript

### PL/PgSQL

### Slonik

### Slonik Typegen

### Slonik Validation

### Template Comment Prefix

## 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!