https://github.com/oceanbase/odc-parser-js
OceanBase Developer Center(ODC) JavaScript SQL parser and Monaco plugin
https://github.com/oceanbase/odc-parser-js
javascript monaco sqlparser
Last synced: 5 months ago
JSON representation
OceanBase Developer Center(ODC) JavaScript SQL parser and Monaco plugin
- Host: GitHub
- URL: https://github.com/oceanbase/odc-parser-js
- Owner: oceanbase
- License: mit
- Created: 2023-08-09T06:09:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-14T07:45:29.000Z (6 months ago)
- Last Synced: 2025-07-14T07:57:08.965Z (6 months ago)
- Topics: javascript, monaco, sqlparser
- Language: JavaScript
- Homepage:
- Size: 4.83 MB
- Stars: 7
- Watchers: 9
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ODC-Parser-JS
ODC-Parser-JS provides a JavaScript version of SQL Parser along with a Out-of-the-box Monaco Plugin. It currently supports OceanBase MySQL and OceanBase Oracle SQL dialect.

## Features
- 🌲 SQL Parser: ODC-Parser-JS provides a JavaScript-based SQL Parser that can parse SQL queries for OceanBase MySQL and OceanBase Oracle databases.
- 📦 Monaco Plugin: It includes a Monaco Plugin that can seamlessly integrate with the Monaco Editor, allowing you to enhance your SQL editing experience.
## Installation
### Monaco Plugin
You can install using npm:
```bash
npm install @oceanbase-odc/monaco-plugin-ob
```
## Usage
### Monaco Plugin
To use the Monaco Plugin, import it in your JavaScript code and initialize it with the Monaco Editor:
```javascript
import Plugin from '@oceanbase-odc/monaco-plugin-ob';
const OBPlugin = new Plugin();
OBPlugin.setup();
monaco.editor.create(domRef.current, {
value,
language: language, // 'obmysql' | 'oboracle'
theme: themeValue, // 'obwhite'
});
```
Make sure you have the Monaco Editor library included in your project.
## Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
## License
ODC-Parser-JS is licensed under the [MIT License](https://github.com/oceanbase/odc-parser-js/blob/main/LICENSE).