Skip to content

Commit ba6136c

Browse files
committed
feat: mysql & oboracle support multiline sql
1 parent fcb0da9 commit ba6136c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

packages/monaco-plugin-ob/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@oceanbase-odc/monaco-plugin-ob",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "",
55
"main": "dist/index.js",
66
"scripts": {

packages/monaco-plugin-ob/src/mysql/worker/parser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ export default {
347347
if (!statement) {
348348
return null;
349349
}
350+
offset = offset - statement.start;
350351
const result = statement.parse(offset, () => {});
351352
if (!result){
352353
return null;

packages/monaco-plugin-ob/src/oboracle/worker/parser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ export default {
419419
*/
420420
return null;
421421
}
422+
offset = offset - statement.start;
422423
const result = statement.parse(offset, () => {});
423424
if (!result){
424425
return null;

0 commit comments

Comments
 (0)