Skip to content

Commit 6378c50

Browse files
committed
add readme
1 parent d08fb5e commit 6378c50

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ODC-Parser-JS
2+
3+
ODC-Parser-JS provides a JavaScript version of SQL Parser along with a ready-to-use Monaco Plugin. It currently supports OceanBase MySQL and OceanBase Oracle SQL dialect.
4+
5+
## Features
6+
7+
- SQL Parser: ODC-Parser-JS provides a JavaScript-based SQL Parser that can parse SQL queries for OceanBase MySQL and OceanBase Oracle databases.
8+
- Monaco Plugin: It includes a Monaco Plugin that can seamlessly integrate with the Monaco Editor, allowing you to enhance your SQL editing experience.
9+
10+
## Installation
11+
12+
### Monaco Plugin
13+
14+
You can install using npm:
15+
16+
```bash
17+
npm install @oceanbase-odc/monaco-plugin-ob
18+
```
19+
20+
## Usage
21+
22+
### Monaco Plugin
23+
24+
To use the Monaco Plugin, import it in your JavaScript code and initialize it with the Monaco Editor:
25+
26+
```javascript
27+
import Plugin from '@oceanbase-odc/monaco-plugin-ob';
28+
const OBPlugin = new Plugin();
29+
OBPlugin.setup();
30+
31+
monaco.editor.create(domRef.current, {
32+
value,
33+
language: language, // 'obmysql' | 'oboracle'
34+
theme: themeValue, // 'obwhite'
35+
});
36+
```
37+
Make sure you have the Monaco Editor library included in your project.
38+
39+
## Contributing
40+
41+
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.
42+
43+
## License
44+
45+
ODC-Parser-JS is licensed under the [MIT License](https://github.com/oceanbase/odc-parser-js/blob/main/LICENSE).

0 commit comments

Comments
 (0)