https://github.com/mikro-orm/sql-highlighter
SQL highlighting for CLI
https://github.com/mikro-orm/sql-highlighter
nodejs sql
Last synced: 5 months ago
JSON representation
SQL highlighting for CLI
- Host: GitHub
- URL: https://github.com/mikro-orm/sql-highlighter
- Owner: mikro-orm
- License: mit
- Created: 2020-08-02T18:09:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-07-07T20:36:53.000Z (5 months ago)
- Last Synced: 2025-07-07T23:44:29.565Z (5 months ago)
- Topics: nodejs, sql
- Language: TypeScript
- Size: 303 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SQL highlighter for CLI
- based on [doctrine/sql-formatter](https://github.com/doctrine/sql-formatter)
- built for CLI
- (almost) dependency free
## 🚀 Quick Start
```
$ yarn add @mikro-orm/sql-highlighter
```
or
```
$ npm i -s @mikro-orm/sql-highlighter
```
Usage:
```typescript
import { SqlHighlighter } from '@mikro-orm/sql-highlighter';
const highlighter = new SqlHighlighter();
const ret = highlighter.highlight('select 1 + 1');
console.log(ret);
```
## 🤝 Contributing
Contributions, issues and feature requests are welcome.
## Authors
👤 **Martin Adámek**
- Twitter: [@B4nan](https://twitter.com/B4nan)
- Github: [@b4nan](https://github.com/b4nan)
See also the list of contributors who [participated](https://github.com/mikro-orm/mikro-orm/contributors) in this project.
## Show Your Support
Please ⭐️ this repository if this project helped you!
## 📝 License
Copyright © 2018 [Martin Adámek](https://github.com/b4nan).
This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details.