From 9a9b2105b8b499b7c69f7dd3949a3cf330023135 Mon Sep 17 00:00:00 2001
From: Linhao-Qian <17768709606@163.com>
Date: Mon, 29 Jul 2024 16:53:32 +0800
Subject: [PATCH] [linkis-web-next]: Modules refactoring & Bug fixing (#5145)
* GlobalHistoryManagement and SideBar modules refactoring & previous bug fixing
* [Linkis-web-next]: parameterConfig Module Refactor
* [Linkis-web-next]: Add code comments to ParameterConfig Module
* [linkis-web-next]: Refactored Navbar & Login Page
---
linkis-web-next/package-lock.json | 18 +-
linkis-web-next/package.json | 4 +-
linkis-web-next/public/log/noLog.svg | 29 +
linkis-web-next/src/App.vue | 2 -
.../src/components/editor/editor.vue | 228 --
.../src/components/editor/highRiskGrammar.ts | 34 -
.../src/components/editor/index.less | 61 -
.../src/components/editor/index.ts | 21 -
.../src/components/editor/index.vue | 96 +
.../src/components/editor/keyword/hql.ts | 2384 -----------------
.../src/components/editor/keyword/python.ts | 384 ---
.../src/components/editor/keyword/sas.ts | 172 --
.../src/components/editor/keyword/sh.ts | 570 ----
.../src/components/editor/languages/hql.ts | 1587 -----------
.../src/components/editor/languages/out.ts | 1570 -----------
.../src/components/editor/languages/sas.ts | 66 -
.../src/components/editor/languages/sh.ts | 220 --
.../src/components/editor/linkis_dml.sql | 50 -
.../src/components/editor/monaco-loader.ts | 23 +-
.../editor/sqlFormatter/core/Formatter.ts | 348 ---
.../editor/sqlFormatter/core/Indentation.ts | 87 -
.../editor/sqlFormatter/core/InlineBlock.ts | 120 -
.../editor/sqlFormatter/core/Params.ts | 47 -
.../editor/sqlFormatter/core/Tokenizer.ts | 508 ----
.../editor/sqlFormatter/core/tokenTypes.ts | 36 -
.../sqlFormatter/languages/Db2Formatter.ts | 601 -----
.../sqlFormatter/languages/N1qlFormatter.ts | 276 --
.../sqlFormatter/languages/PlSqlFormatter.ts | 463 ----
.../languages/StandardSqlFormatter.ts | 379 ---
.../editor/sqlFormatter/sqlFormatter.ts | 51 -
linkis-web-next/src/components/editor/util.ts | 14 +-
.../src/components/sidebar/index.less | 37 +-
.../src/components/sidebar/index.vue | 77 +-
.../src/dss/assets/styles/app.less | 92 -
.../src/dss/assets/styles/normalize.less | 387 ---
linkis-web-next/src/dss/dssRouter.ts | 19 -
linkis-web-next/src/dss/view/app.vue | 28 -
.../src/dss/view/commonIframe/index.vue | 101 -
linkis-web-next/src/dss/view/layout.vue | 24 -
.../src/dss/view/logPage/index.vue | 125 -
linkis-web-next/src/dss/view/login/index.vue | 183 +-
linkis-web-next/src/helper/db.ts | 51 +-
linkis-web-next/src/helper/storage.ts | 12 +-
linkis-web-next/src/layout.vue | 332 +--
linkis-web-next/src/locales/en.ts | 235 +-
linkis-web-next/src/locales/zh.ts | 106 +-
linkis-web-next/src/main.ts | 3 +-
.../pages/globalHistoryManagement/count.vue | 88 +-
.../pages/globalHistoryManagement/drawer.vue | 248 --
.../globalHistoryManagement/drawer/index.vue | 171 ++
.../drawer/taskLogs.vue | 251 ++
.../pages/globalHistoryManagement/filter.vue | 230 +-
.../pages/globalHistoryManagement/index.less | 18 -
.../pages/globalHistoryManagement/index.vue | 361 ++-
.../pages/globalHistoryManagement/table.vue | 362 ---
.../globalHistoryManagement/tooltipText.vue | 20 +-
linkis-web-next/src/pages/login/index.vue | 201 --
.../src/pages/parameterConfig/card.vue | 249 +-
.../src/pages/parameterConfig/drawer.vue | 826 +++---
.../src/pages/parameterConfig/handleChange.ts | 24 -
.../src/pages/parameterConfig/ide/index.vue | 103 -
.../src/pages/parameterConfig/index.less | 45 +-
.../src/pages/parameterConfig/index.vue | 202 +-
.../src/pages/parameterConfig/list.vue | 129 -
.../src/pages/parameterConfig/modal.vue | 121 +-
.../pages/parameterConfig/scripts/index.vue | 20 -
.../parameterConfig/tableauServer/index.vue | 20 -
linkis-web-next/src/router/index.ts | 110 +-
linkis-web-next/src/service/api.ts | 82 +-
linkis-web-next/src/service/apiCache.ts | 25 +-
linkis-web-next/src/style/style.less | 593 +---
linkis-web-next/src/util/currentModules.ts | 50 -
linkis-web-next/src/util/index.ts | 49 +-
73 files changed, 2506 insertions(+), 14353 deletions(-)
create mode 100644 linkis-web-next/public/log/noLog.svg
delete mode 100644 linkis-web-next/src/components/editor/editor.vue
delete mode 100644 linkis-web-next/src/components/editor/highRiskGrammar.ts
delete mode 100644 linkis-web-next/src/components/editor/index.less
delete mode 100644 linkis-web-next/src/components/editor/index.ts
create mode 100644 linkis-web-next/src/components/editor/index.vue
delete mode 100644 linkis-web-next/src/components/editor/keyword/hql.ts
delete mode 100644 linkis-web-next/src/components/editor/keyword/python.ts
delete mode 100644 linkis-web-next/src/components/editor/keyword/sas.ts
delete mode 100644 linkis-web-next/src/components/editor/keyword/sh.ts
delete mode 100644 linkis-web-next/src/components/editor/languages/hql.ts
delete mode 100644 linkis-web-next/src/components/editor/languages/out.ts
delete mode 100644 linkis-web-next/src/components/editor/languages/sas.ts
delete mode 100644 linkis-web-next/src/components/editor/languages/sh.ts
delete mode 100644 linkis-web-next/src/components/editor/linkis_dml.sql
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/core/Formatter.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/core/Indentation.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/core/InlineBlock.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/core/Params.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/core/Tokenizer.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/core/tokenTypes.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/languages/Db2Formatter.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/languages/N1qlFormatter.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/languages/PlSqlFormatter.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/languages/StandardSqlFormatter.ts
delete mode 100644 linkis-web-next/src/components/editor/sqlFormatter/sqlFormatter.ts
delete mode 100644 linkis-web-next/src/dss/assets/styles/app.less
delete mode 100644 linkis-web-next/src/dss/assets/styles/normalize.less
delete mode 100644 linkis-web-next/src/dss/view/app.vue
delete mode 100644 linkis-web-next/src/dss/view/commonIframe/index.vue
delete mode 100644 linkis-web-next/src/dss/view/layout.vue
delete mode 100644 linkis-web-next/src/dss/view/logPage/index.vue
delete mode 100644 linkis-web-next/src/pages/globalHistoryManagement/drawer.vue
create mode 100644 linkis-web-next/src/pages/globalHistoryManagement/drawer/index.vue
create mode 100644 linkis-web-next/src/pages/globalHistoryManagement/drawer/taskLogs.vue
delete mode 100644 linkis-web-next/src/pages/globalHistoryManagement/table.vue
delete mode 100644 linkis-web-next/src/pages/login/index.vue
delete mode 100644 linkis-web-next/src/pages/parameterConfig/handleChange.ts
delete mode 100644 linkis-web-next/src/pages/parameterConfig/ide/index.vue
delete mode 100644 linkis-web-next/src/pages/parameterConfig/list.vue
delete mode 100644 linkis-web-next/src/pages/parameterConfig/scripts/index.vue
delete mode 100644 linkis-web-next/src/pages/parameterConfig/tableauServer/index.vue
delete mode 100644 linkis-web-next/src/util/currentModules.ts
diff --git a/linkis-web-next/package-lock.json b/linkis-web-next/package-lock.json
index 35faba2895..e61a92ab16 100644
--- a/linkis-web-next/package-lock.json
+++ b/linkis-web-next/package-lock.json
@@ -1,11 +1,11 @@
{
- "name": "LINKIS-WEB-NEXT",
+ "name": "linkis-web-next",
"version": "0.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "name": "LINKIS-WEB-NEXT",
+ "name": "linkis-web-next",
"version": "0.0.0",
"dependencies": {
"@fesjs/fes-design": "^0.7.31",
@@ -13,7 +13,7 @@
"@vitejs/plugin-vue": "^4.1.0",
"axios": "^1.6.0",
"dayjs": "^1.11.10",
- "dexie": "^3.2.4",
+ "dexie": "^3.2.7",
"md5": "^2.3.0",
"monaco-editor": "^0.43.0",
"qs": "^6.11.2",
@@ -2074,9 +2074,9 @@
}
},
"node_modules/dexie": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.4.tgz",
- "integrity": "sha512-VKoTQRSv7+RnffpOJ3Dh6ozknBqzWw/F3iqMdsZg958R0AS8AnY9x9d1lbwENr0gzeGJHXKcGhAMRaqys6SxqA==",
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.7.tgz",
+ "integrity": "sha512-2a+BXvVhY5op+smDRLxeBAivE7YcYaneXJ1la3HOkUfX9zKkE/AJ8CNgjiXbtXepFyFmJNGSbmjOwqbT749r/w==",
"engines": {
"node": ">=6.0"
}
@@ -7847,9 +7847,9 @@
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"dexie": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.4.tgz",
- "integrity": "sha512-VKoTQRSv7+RnffpOJ3Dh6ozknBqzWw/F3iqMdsZg958R0AS8AnY9x9d1lbwENr0gzeGJHXKcGhAMRaqys6SxqA=="
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.7.tgz",
+ "integrity": "sha512-2a+BXvVhY5op+smDRLxeBAivE7YcYaneXJ1la3HOkUfX9zKkE/AJ8CNgjiXbtXepFyFmJNGSbmjOwqbT749r/w=="
},
"diff": {
"version": "4.0.2",
diff --git a/linkis-web-next/package.json b/linkis-web-next/package.json
index cac75a3a62..aed084825e 100644
--- a/linkis-web-next/package.json
+++ b/linkis-web-next/package.json
@@ -1,5 +1,5 @@
{
- "name": "LINKIS-WEB-NEXT",
+ "name": "linkis-web-next",
"private": true,
"version": "0.0.0",
"type": "module",
@@ -15,7 +15,7 @@
"@vitejs/plugin-vue": "^4.1.0",
"axios": "^1.6.0",
"dayjs": "^1.11.10",
- "dexie": "^3.2.4",
+ "dexie": "^3.2.7",
"md5": "^2.3.0",
"monaco-editor": "^0.43.0",
"qs": "^6.11.2",
diff --git a/linkis-web-next/public/log/noLog.svg b/linkis-web-next/public/log/noLog.svg
new file mode 100644
index 0000000000..bfa8899949
--- /dev/null
+++ b/linkis-web-next/public/log/noLog.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/linkis-web-next/src/App.vue b/linkis-web-next/src/App.vue
index 104f17c2f4..8a47ecd48b 100644
--- a/linkis-web-next/src/App.vue
+++ b/linkis-web-next/src/App.vue
@@ -18,5 +18,3 @@
-
-
diff --git a/linkis-web-next/src/components/editor/editor.vue b/linkis-web-next/src/components/editor/editor.vue
deleted file mode 100644
index 3821e24489..0000000000
--- a/linkis-web-next/src/components/editor/editor.vue
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/linkis-web-next/src/components/editor/highRiskGrammar.ts b/linkis-web-next/src/components/editor/highRiskGrammar.ts
deleted file mode 100644
index 3111068c44..0000000000
--- a/linkis-web-next/src/components/editor/highRiskGrammar.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const hql = [
- /Truncate\s*Table/i,
- /Drop\s*Table/i,
- /Drop\s*Function/i,
- /Drop\s*Database/i,
- /ALTER\s*DATABASE/i,
-];
-
-const python = [/sys/i, /os/i, /sc\.stop/i, /spark\.stop/i];
-
-const scala = [/sc\.stop/i, /spark\.stop/i];
-
-export default {
- hql,
- python,
- scala,
-};
diff --git a/linkis-web-next/src/components/editor/index.less b/linkis-web-next/src/components/editor/index.less
deleted file mode 100644
index 46abc63d71..0000000000
--- a/linkis-web-next/src/components/editor/index.less
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// @import '~@/common/style/variables.scss';
-.we-editor {
- height: 100%;
- width: 100%;
- a {
- color: #646465 !important;
- }
- .glyphMarginClass {
- background: #ff9900;
- }
- .contentClass {
- background: #fad8a483;
- }
- .inlineDecoration {
- position: relative;
- color: #ff9900 !important;
- cursor: pointer;
- font-style: oblique;
- // wavy line(波浪线)
- &::after {
- content: '';
- position: absolute;
- bottom: -2px;
- left: 5%;
- width: 90%;
- height: 2px;
- background: -webkit-linear-gradient(
- 315deg,
- transparent,
- transparent 45%,
- #ed4014,
- transparent 55%,
- transparent 100%
- ),
- -webkit-linear-gradient(45deg, transparent, transparent 45%, #ed4014, transparent
- 55%, transparent 100%);
- background-size: 4px 4px;
- background-repeat: repeat-x;
- }
- }
- .highRiskGrammar {
- color: red;
- }
-}
diff --git a/linkis-web-next/src/components/editor/index.ts b/linkis-web-next/src/components/editor/index.ts
deleted file mode 100644
index 0dca9fd678..0000000000
--- a/linkis-web-next/src/components/editor/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-import weEditor from './editor.vue';
-
-export default weEditor;
diff --git a/linkis-web-next/src/components/editor/index.vue b/linkis-web-next/src/components/editor/index.vue
new file mode 100644
index 0000000000..667982d5c3
--- /dev/null
+++ b/linkis-web-next/src/components/editor/index.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
diff --git a/linkis-web-next/src/components/editor/keyword/hql.ts b/linkis-web-next/src/components/editor/keyword/hql.ts
deleted file mode 100644
index 25ac60bc35..0000000000
--- a/linkis-web-next/src/components/editor/keyword/hql.ts
+++ /dev/null
@@ -1,2384 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { isEmpty } from 'lodash';
-import { getHiveList, getReturnList, getFormatProposalsList } from '../util';
-import storage from '@/common/helper/storage';
-
-const kewordInfoProposals = [
- {
- label: 'ADD',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ADD',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ADMIN',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ADMIN',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'AFTER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'AFTER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ANALYZE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ANALYZE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ASC',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ASC',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'BEFORE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'BEFORE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'BUCKET',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'BUCKET',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'BUCKETS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'BUCKETS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'CASCADE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'CASCADE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'CHANGE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'CHANGE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'CLUSTER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'CLUSTER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'CLUSTERED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'CLUSTERED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'CLUSTERSTATUS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'CLUSTERSTATUS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'COLLECTION',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'COLLECTION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'COLUMNS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'COLUMNS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'COMMENT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'COMMENT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'COMPACT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'COMPACT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'COMPACTIONS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'COMPACTIONS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'COMPUTE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'COMPUTE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'CONCATENATE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'CONCATENATE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'CONTINUE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'CONTINUE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DATA',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DATA',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DATABASES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DATABASES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DATETIME',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DATETIME',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DAY',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DAY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DBPROPERTIES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DBPROPERTIES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DEFERRED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DEFERRED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DEFINED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DEFINED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DELIMITED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DELIMITED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DEPENDENCY',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DEPENDENCY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DESC',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DESC',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DIRECTORIES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DIRECTORIES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DIRECTORY',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DIRECTORY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DISABLE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DISABLE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DISTRIBUTE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'DISTRIBUTE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ELEM_TYPE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ELEM_TYPE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ENABLE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ENABLE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ESCAPED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ESCAPED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'EXCLUSIVE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'EXCLUSIVE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'EXPLAIN',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'EXPLAIN',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'EXPORT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'EXPORT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'FIELDS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'FIELDS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'FILE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'FILE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'FILEFORMAT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'FILEFORMAT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'FIRST',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'FIRST',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'FORMAT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'FORMAT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'FORMATTED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'FORMATTED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'FUNCTIONS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'FUNCTIONS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'HOLD_DDLTIME',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'HOLD_DDLTIME',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'HOUR',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'HOUR',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'IDXPROPERTIES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'IDXPROPERTIES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'IGNORE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'IGNORE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'INDEX',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'INDEX',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'INDEXES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'INDEXES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'INPATH',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'INPATH',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'INPUTDRIVER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'INPUTDRIVER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'INPUTFORMAT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'INPUTFORMAT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ITEMS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ITEMS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'JAR',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'JAR',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'KEYS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'KEYS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'KEY_TYPE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'KEY_TYPE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LIMIT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LIMIT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LINES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LINES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LOAD',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LOAD',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LOCATION',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LOCATION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LOCK',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LOCK',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LOCKS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LOCKS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LOGICAL',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LOGICAL',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LONG',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'LONG',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MAPJOIN',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'MAPJOIN',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MATERIALIZED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'MATERIALIZED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'METADATA',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'METADATA',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MINUS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'MINUS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MINUTE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'MINUTE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MONTH',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'MONTH',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MSCK',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'MSCK',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'NOSCAN',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'NOSCAN',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'NO_DROP',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'NO_DROP',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OFFLINE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'OFFLINE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OPTION',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'OPTION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OUTPUTDRIVER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'OUTPUTDRIVER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OUTPUTFORMAT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'OUTPUTFORMAT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OVERWRITE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'OVERWRITE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OWNER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'OWNER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'PARTITIONED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'PARTITIONED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'PARTITIONS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'PARTITIONS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'PLUS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'PLUS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'PRETTY',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'PRETTY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'PRINCIPALS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'PRINCIPALS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'PROTECTION',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'PROTECTION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'PURGE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'PURGE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'READ',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'READ',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'READONLY',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'READONLY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'REBUILD',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'REBUILD',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'RECORDREADER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'RECORDREADER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'RECORDWRITER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'RECORDWRITER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'REGEXP',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'REGEXP',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'RELOAD',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'RELOAD',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'RENAME',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'RENAME',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'REPAIR',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'REPAIR',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'REPLACE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'REPLACE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'REPLICATION',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'REPLICATION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'RESTRICT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'RESTRICT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'REWRITE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'REWRITE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'RLIKE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'RLIKE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ROLE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ROLE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ROLES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'ROLES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SCHEMA',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SCHEMA',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SCHEMAS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SCHEMAS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SECOND',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SECOND',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SEMI',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SEMI',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SERDE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SERDE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SERDEPROPERTIES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SERDEPROPERTIES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SERVER',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SERVER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SETS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SETS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SHARED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SHARED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SHOW',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SHOW',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SHOW_DATABASE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SHOW_DATABASE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SKEWED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SKEWED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SORT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SORT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SORTED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SORTED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SSL',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'SSL',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'STATISTICS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'STATISTICS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'STORED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'STORED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'STREAMTABLE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'STREAMTABLE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'STRING',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'STRING',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'STRUCT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'STRUCT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TABLES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'TABLES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TBLPROPERTIES',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'TBLPROPERTIES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TEMPORARY',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'TEMPORARY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TERMINATED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'TERMINATED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TINYINT',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'TINYINT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TOUCH',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'TOUCH',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TRANSACTIONS',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'TRANSACTIONS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UNARCHIVE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UNARCHIVE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UNDO',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UNDO',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UNIONTYPE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UNIONTYPE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UNLOCK',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UNLOCK',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UNSET',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UNSET',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UNSIGNED',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UNSIGNED',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'URI',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'URI',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'USE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'USE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UTC',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UTC',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'UTCTIMESTAMP',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'UTCTIMESTAMP',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'VALUE_TYPE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'VALUE_TYPE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'VIEW',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'VIEW',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'WHILE',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'WHILE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'YEAR',
- documentation: 'Hive 1.2.0 Non-reserved Keywords',
- insertText: 'YEAR',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'AUTOCOMMIT',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'AUTOCOMMIT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ISOLATION',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'ISOLATION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LEVEL',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'LEVEL',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OFFSET',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'OFFSET',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SNAPSHOT',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'SNAPSHOT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TRANSACTION',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'TRANSACTION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'WORK',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'WORK',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'WRITE',
- documentation: 'Hive 2.0.0 Non-reserved Keywords',
- insertText: 'WRITE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ABORT',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'ABORT',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'KEY',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'KEY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'LAST',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'LAST',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'NORELY',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'NORELY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'NOVALIDATE',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'NOVALIDATE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'NULLS',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'NULLS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'RELY',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'RELY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'VALIDATE',
- documentation: 'Hive 2.1.0 Non-reserved Keywords',
- insertText: 'VALIDATE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DETAIL',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'DETAIL',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DOW',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'DOW',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'EXPRESSION',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'EXPRESSION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'OPERATOR',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'OPERATOR',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'QUARTER',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'QUARTER',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SUMMARY',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'SUMMARY',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'VECTORIZATION',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'VECTORIZATION',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'WEEK',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'WEEK',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'YEARS',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'YEARS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MONTHS',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'MONTHS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'WEEKS',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'WEEKS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'DAYS',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'DAYS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'HOURS',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'HOURS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'MINUTES',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'MINUTES',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'SECONDS',
- documentation: 'Hive 2.2.0 Non-reserved Keywords',
- insertText: 'SECONDS',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'TIMESTAMPTZ',
- documentation: 'Hive 3.0.0 Non-reserved Keywords',
- insertText: 'TIMESTAMPTZ',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ZONE',
- documentation: 'Hive 3.0.0 Non-reserved Keywords',
- insertText: 'ZONE',
- detail: 'Non-reserved Keywords',
- },
- {
- label: 'ALL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ALL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ALTER',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ALTER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'AND',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'AND',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ARRAY',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ARRAY',
- detail: 'Reserved Keywords',
- },
- {
- label: 'AS',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'AS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'AUTHORIZATION',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'AUTHORIZATION',
- detail: 'Reserved Keywords',
- },
- {
- label: 'BETWEEN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'BETWEEN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'BIGINT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'BIGINT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'BINARY',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'BINARY',
- detail: 'Reserved Keywords',
- },
- {
- label: 'BOOLEAN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'BOOLEAN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'BOTH',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'BOTH',
- detail: 'Reserved Keywords',
- },
- {
- label: 'BY',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'BY',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CASE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CASE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CAST',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CAST',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CHAR',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CHAR',
- detail: 'Reserved Keywords',
- },
- {
- label: 'COLUMN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'COLUMN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CONF',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CONF',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CREATE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CREATE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CROSS',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CROSS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CUBE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CUBE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CURRENT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CURRENT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CURRENT_DATE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CURRENT_DATE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CURRENT_TIMESTAMP',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CURRENT_TIMESTAMP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CURSOR',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'CURSOR',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DATABASE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DATABASE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DATE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DATE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DECIMAL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DECIMAL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DELETE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DELETE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DESCRIBE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DESCRIBE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DISTINCT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DISTINCT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DOUBLE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DOUBLE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DROP',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'DROP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ELSE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ELSE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'END',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'END',
- detail: 'Reserved Keywords',
- },
- {
- label: 'EXCHANGE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'EXCHANGE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'EXISTS',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'EXISTS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'EXTENDED',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'EXTENDED',
- detail: 'Reserved Keywords',
- },
- {
- label: 'EXTERNAL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'EXTERNAL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FALSE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'FALSE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'EXTERNAL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'EXTERNAL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FETCH',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'FETCH',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FLOAT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'FLOAT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FOLLOWING',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'EXFOLLOWINGTERNAL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FOR',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'FOR',
- detail: 'Reserved Keywords',
- },
- {
- label: 'from',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'from',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FULL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'FULL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FUNCTION',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'FUNCTION',
- detail: 'Reserved Keywords',
- },
- {
- label: 'GRANT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'GRANT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'GROUP',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'GROUP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'GROUPING',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'GROUPING',
- detail: 'Reserved Keywords',
- },
- {
- label: 'HAVING',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'HAVING',
- detail: 'Reserved Keywords',
- },
- {
- label: 'IF',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'IF',
- detail: 'Reserved Keywords',
- },
- {
- label: 'IMPORT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'IMPORT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'IN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'IN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'INNER',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'INNER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'INSERT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'INSERT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'INT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'INT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'INTERSECT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'INTERSECT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'INTERVAL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'INTERVAL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'INTO',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'INTO',
- detail: 'Reserved Keywords',
- },
- {
- label: 'IS',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'IS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'JOIN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'JOIN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'LATERAL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'LATERAL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'LEFT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'LEFT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'LESS',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'LESS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'LIKE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'LIKE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'LOCAL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'LOCAL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'MACRO',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'MACRO',
- detail: 'Reserved Keywords',
- },
- {
- label: 'MAP',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'MAP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'MORE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'MORE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'NONE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'NONE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'NOT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'NOT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'NULL',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'NULL',
- detail: 'Reserved Keywords',
- },
- {
- label: 'OF',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'OF',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ON',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ON',
- detail: 'Reserved Keywords',
- },
- {
- label: 'OR',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'OR',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ORDER',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ORDER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'OUT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'OUT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'OUTER',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'OUTER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'OVER',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'OVER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PARTIALSCAN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'PARTIALSCAN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PARTITION',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'PARTITION',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PERCENT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'PERCENT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PRECEDING',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'PRECEDING',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PRESERVE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'PRESERVE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PROCEDURE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'PROCEDURE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'RANGE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'RANGE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'READS',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'READS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'REDUCE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'REDUCE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'REVOKE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'REVOKE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'RIGHT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'RIGHT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ROLLUP',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ROLLUP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ROW',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ROW',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ROWS',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'ROWS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'SELECT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'SELECT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'SET',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'SET',
- detail: 'Reserved Keywords',
- },
- {
- label: 'SMALLINT',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'SMALLINT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TABLE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TABLE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TABLESAMPLE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TABLESAMPLE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'THEN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'THEN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TIMESTAMP',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TIMESTAMP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TO',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TO',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TRANSFORM',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TRANSFORM',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TRIGGER',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TRIGGER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TRUE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TRUE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TRUNCATE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'TRUNCATE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'UNBOUNDED',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'UNBOUNDED',
- detail: 'Reserved Keywords',
- },
- {
- label: 'UNION',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'UNION',
- detail: 'Reserved Keywords',
- },
- {
- label: 'UNIQUEJOIN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'UNIQUEJOIN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'UPDATE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'UPDATE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'USER',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'USER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'USING',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'USING',
- detail: 'Reserved Keywords',
- },
- {
- label: 'UTC_TMESTAMP',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'UTC_TMESTAMP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'VALUES',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'VALUES',
- detail: 'Reserved Keywords',
- },
- {
- label: 'VARCHAR',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'VARCHAR',
- detail: 'Reserved Keywords',
- },
- {
- label: 'WHEN',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'WHEN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'WHERE',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'WHERE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'WINDOW',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'WINDOW',
- detail: 'Reserved Keywords',
- },
- {
- label: 'WITH',
- documentation: 'Hive 1.2.0 Reserved Keywords',
- insertText: 'WITH',
- detail: 'Reserved Keywords',
- },
- {
- label: 'COMMIT',
- documentation: 'Hive 2.0.0 Reserved Keywords',
- insertText: 'COMMIT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ONLY',
- documentation: 'Hive 2.0.0 Reserved Keywords',
- insertText: 'ONLY',
- detail: 'Reserved Keywords',
- },
- {
- label: 'REGEXP',
- documentation: 'Hive 2.0.0 Reserved Keywords',
- insertText: 'REGEXP',
- detail: 'Reserved Keywords',
- },
- {
- label: 'RLIKE',
- documentation: 'Hive 2.0.0 Reserved Keywords',
- insertText: 'RLIKE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ROLLBACK',
- documentation: 'Hive 2.0.0 Reserved Keywords',
- insertText: 'ROLLBACK',
- detail: 'Reserved Keywords',
- },
- {
- label: 'START',
- documentation: 'Hive 2.0.0 Reserved Keywords',
- insertText: 'START',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CACHE',
- documentation: 'Hive 2.1.0 Reserved Keywords',
- insertText: 'CACHE',
- detail: 'Reserved Keywords',
- },
- {
- label: 'CONSTRAINT',
- documentation: 'Hive 2.1.0 Reserved Keywords',
- insertText: 'CONSTRAINT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FOREIGN',
- documentation: 'Hive 2.1.0 Reserved Keywords',
- insertText: 'FOREIGN',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PRIMARY',
- documentation: 'Hive 2.1.0 Reserved Keywords',
- insertText: 'PRIMARY',
- detail: 'Reserved Keywords',
- },
- {
- label: 'DAYOFWEEK',
- documentation: 'Hive 2.2.0 Reserved Keywords',
- insertText: 'DAYOFWEEK',
- detail: 'Reserved Keywords',
- },
- {
- label: 'EXTRACT',
- documentation: 'Hive 2.2.0 Reserved Keywords',
- insertText: 'EXTRACT',
- detail: 'Reserved Keywords',
- },
- {
- label: 'FLOOR',
- documentation: 'Hive 2.2.0 Reserved Keywords',
- insertText: 'FLOOR',
- detail: 'Reserved Keywords',
- },
- {
- label: 'INTEGER',
- documentation: 'Hive 2.2.0 Reserved Keywords',
- insertText: 'INTEGER',
- detail: 'Reserved Keywords',
- },
- {
- label: 'PRECISION',
- documentation: 'Hive 2.2.0 Reserved Keywords',
- insertText: 'PRECISION',
- detail: 'Reserved Keywords',
- },
- {
- label: 'VIEWS',
- documentation: 'Hive 2.2.0 Reserved Keywords',
- insertText: 'VIEWS',
- detail: 'Reserved Keywords',
- },
- {
- label: 'TIME',
- documentation: 'Hive 3.0.0 Reserved Keywords',
- insertText: 'TIME',
- detail: 'Reserved Keywords',
- },
- {
- label: 'NUMERIC',
- documentation: 'Hive 3.0.0 Reserved Keywords',
- insertText: 'NUMERIC',
- detail: 'Reserved Keywords',
- },
- {
- label: 'ide.engine.no.limit.allow',
- documentation: '当设置为true时,本次执行的SQL将进行全量导出',
- insertText: 'ide.engine.no.limit.allow',
- detail: 'build-in parameters',
- },
-];
-// Common grammatical structures(常用语法结构)
-const commonGrammaticalStruCture = [
- {
- label: 'drop table',
- documentation: '删除hive表',
- insertText: 'drop table if exists {${1:table_name}$0};',
- detail: '常用语法结构',
- },
- {
- label: 'create table partitioned by',
- documentation: '创建hive分区表',
- insertText:
- 'create table {${1:table_name}$0} ({${2:columns}}) partitioned by ({${3:partition}}) row format delimited fields terminated by "," stored as orc;',
- detail: '常用语法结构',
- },
- {
- label: 'create table as select',
- documentation: '通过select创建表',
- insertText: 'create table {${1:table_name}$0} as select;',
- detail: '常用语法结构',
- },
- {
- label: 'insert into table',
- documentation: '添加方式插入数据',
- insertText:
- 'insert into table {${1:table_name}$0} partition({partition});',
- detail: '常用语法结构',
- },
- {
- label: 'insert overwrite table',
- documentation: '覆盖方式插入数据',
- insertText:
- 'insert overwrite table {${1:table_name}$0} partition({partition});',
- detail: '常用语法结构',
- },
-];
-// System Embedded Variables(系统内嵌变量)
-const buildInVariableProposals = [
- {
- label: 'run_date',
- documentation: '当前日期的前一天',
- insertText: '${run_date}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_date_std',
- documentation: '当前日期的前一天,年月日之间有横杠分割',
- insertText: '${run_date_std}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_begin',
- documentation: '当前月份的第一天',
- insertText: '${run_month_begin}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_begin_std',
- documentation: '当前月份的第一天,年月日之间有横杠分割',
- insertText: '${run_month_begin_std}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_end',
- documentation: '当前月份的最后一天',
- insertText: '${run_month_end}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_end_std',
- documentation: '当前月份的最后一天,年月日之间有横杠分割',
- insertText: '${run_month_end_std}',
- detail: '系统内嵌变量',
- },
-];
-const columnsProposals = [
- {
- label: 'id',
- documentation: '常用表字段',
- insertText: 'id',
- detail: '常用表字段',
- },
- {
- label: 'id_id',
- documentation: '常用表字段',
- insertText: 'id_id',
- detail: '常用表字段',
- },
- {
- label: 'org',
- documentation: '常用表字段',
- insertText: 'org',
- detail: '常用表字段',
- },
- {
- label: 'product_cd',
- documentation: '常用表字段',
- insertText: 'product_cd',
- detail: '常用表字段',
- },
- {
- label: 'id_no_hash',
- documentation: '常用表字段',
- insertText: 'id_no_hash',
- detail: '常用表字段',
- },
- {
- label: 'id_no_mask',
- documentation: '常用表字段',
- insertText: 'id_no_mask',
- detail: '常用表字段',
- },
- {
- label: 'app_no',
- documentation: '常用表字段',
- insertText: 'app_no',
- detail: '常用表字段',
- },
- {
- label: 'ecif_no',
- documentation: '常用表字段',
- insertText: 'ecif_no',
- detail: '常用表字段',
- },
- {
- label: 'name_hash',
- documentation: '常用表字段',
- insertText: 'name_hash',
- detail: '常用表字段',
- },
- {
- label: 'acct_no',
- documentation: '常用表字段',
- insertText: 'acct_no',
- detail: '常用表字段',
- },
- {
- label: 'card_no',
- documentation: '常用表字段',
- insertText: 'card_no',
- detail: '常用表字段',
- },
- {
- label: 'cust_id',
- documentation: '常用表字段',
- insertText: 'cust_id',
- detail: '常用表字段',
- },
- {
- label: 'case_no',
- documentation: '常用表字段',
- insertText: 'case_no',
- detail: '常用表字段',
- },
- {
- label: 'id_type',
- documentation: '常用表字段',
- insertText: 'id_type',
- detail: '常用表字段',
- },
- {
- label: 'id_no',
- documentation: '常用表字段',
- insertText: 'id_no',
- detail: '常用表字段',
- },
- {
- label: 'cust_type',
- documentation: '常用表字段',
- insertText: 'cust_type',
- detail: '常用表字段',
- },
- {
- label: 'cust_no',
- documentation: '常用表字段',
- insertText: 'cust_no',
- detail: '常用表字段',
- },
- {
- label: 'app_type',
- documentation: '常用表字段',
- insertText: 'app_type',
- detail: '常用表字段',
- },
- {
- label: 'openid',
- documentation: '常用表字段',
- insertText: 'openid',
- detail: '常用表字段',
- },
- {
- label: 'acct_type',
- documentation: '常用表字段',
- insertText: 'acct_type',
- detail: '常用表字段',
- },
- {
- label: 'prod_code',
- documentation: '常用表字段',
- insertText: 'prod_code',
- detail: '常用表字段',
- },
- {
- label: 'prod_id',
- documentation: '常用表字段',
- insertText: 'prod_id',
- detail: '常用表字段',
- },
- {
- label: 'partner_id',
- documentation: '常用表字段',
- insertText: 'partner_id',
- detail: '常用表字段',
- },
- {
- label: 'product_id',
- documentation: '常用表字段',
- insertText: 'product_id',
- detail: '常用表字段',
- },
- {
- label: 'id_acct',
- documentation: '常用表字段',
- insertText: 'id_acct',
- detail: '常用表字段',
- },
- {
- label: 'id_app',
- documentation: '常用表字段',
- insertText: 'id_app',
- detail: '常用表字段',
- },
- {
- label: 'c_prod_cd',
- documentation: '常用表字段',
- insertText: 'c_prod_cd',
- detail: '常用表字段',
- },
- {
- label: 'id_cust',
- documentation: '常用表字段',
- insertText: 'id_cust',
- detail: '常用表字段',
- },
- {
- label: 'id_openid',
- documentation: '常用表字段',
- insertText: 'id_openid',
- detail: '常用表字段',
- },
- {
- label: 'id_wx_openid',
- documentation: '常用表字段',
- insertText: 'id_wx_openid',
- detail: '常用表字段',
- },
- {
- label: 'id_qq_openid',
- documentation: '常用表字段',
- insertText: 'id_qq_openid',
- detail: '常用表字段',
- },
- {
- label: 'id_sg_openid',
- documentation: '常用表字段',
- insertText: 'id_sg_openid',
- detail: '常用表字段',
- },
- {
- label: 'id_loan',
- documentation: '常用表字段',
- insertText: 'id_loan',
- detail: '常用表字段',
- },
- {
- label: 'id_org',
- documentation: '常用表字段',
- insertText: 'id_org',
- detail: '常用表字段',
- },
- {
- label: 'reportsn',
- documentation: '常用表字段',
- insertText: 'reportsn',
- detail: '常用表字段',
- },
- {
- label: 'id_batch',
- documentation: '常用表字段',
- insertText: 'id_batch',
- detail: '常用表字段',
- },
- {
- label: 'id_case',
- documentation: '常用表字段',
- insertText: 'id_case',
- detail: '常用表字段',
- },
- {
- label: 'ds',
- documentation: '常用表字段',
- insertText: 'ds',
- detail: '常用表字段',
- },
-];
-
-let dbInfoProposals = [];
-let tableInfoProposals = [];
-let udfProposals = [];
-let variableProposals = [];
-
-export default {
- keyword: kewordInfoProposals,
- register(monaco) {
- const lang = 'hql';
- const hqlProposals = getFormatProposalsList(
- monaco,
- kewordInfoProposals,
- '',
- 'Keyword',
- );
- const BIVPro = getFormatProposalsList(
- monaco,
- buildInVariableProposals,
- '',
- 'Variable',
- );
- const CGSPro = getFormatProposalsList(
- monaco,
- commonGrammaticalStruCture,
- '',
- 'Reference',
- false,
- true,
- );
- const columnsPro = getFormatProposalsList(
- monaco,
- columnsProposals,
- '',
- 'Field',
- );
- getHiveList(monaco, lang).then((list) => {
- dbInfoProposals = list.dbInfoProposals;
- tableInfoProposals = list.tableInfoProposals;
- udfProposals = list.udfProposals;
- variableProposals = list.variableProposals;
- });
- monaco.languages.registerCompletionItemProvider('hql', {
- triggerCharacters:
- 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._'.split(
- '',
- ),
- async provideCompletionItems(model, position) {
- const empty =
- isEmpty(dbInfoProposals) ||
- isEmpty(udfProposals) ||
- isEmpty(tableInfoProposals) ||
- isEmpty(variableProposals);
- const needRefresh = storage.get('need-refresh-proposals-hql');
- if (needRefresh === true || empty) {
- const list = await getHiveList(monaco, lang);
- dbInfoProposals = list.dbInfoProposals;
- tableInfoProposals = list.tableInfoProposals;
- udfProposals = list.udfProposals;
- variableProposals = list.variableProposals;
- storage.set('need-refresh-proposals-hql', false);
- }
- const textUntilPosition = model.getValueInRange({
- startLineNumber: position.lineNumber,
- startColumn: 1,
- endLineNumber: position.lineNumber,
- endColumn: position.column,
- });
-
- const tableMatch = textUntilPosition.match(
- /from\s+(\w+)\.(\w+)?$/,
- );
- const databaseMatch = textUntilPosition.match(/from\s+\w+$/);
- const functionMatch = textUntilPosition.match(
- /(select|where|on|having|order by|cluster by|sort by)\s+\w+$/i,
- );
- const keywordMatch = textUntilPosition.match(/([^"]*)?$/i);
- const grammarBlockMatch = textUntilPosition.match(
- /(create table|drop table)\s?$/i,
- );
- // debug_log('log',tableMatch,databaseMatch,functionMatch,keywordMatch,grammarBlockMatch)
- if (tableMatch) {
- return getReturnList({
- match: tableMatch[2],
- proposals: tableInfoProposals,
- fieldString: 'caption',
- attachMatch: tableMatch[1],
- });
- } else if (databaseMatch) {
- const match = databaseMatch[0].split(' ')[1];
- return getReturnList({
- match,
- proposals: dbInfoProposals,
- fieldString: 'caption',
- });
- } else if (grammarBlockMatch) {
- const match = grammarBlockMatch[0].split(' ')[1];
- return getReturnList({
- match,
- proposals: CGSPro,
- fieldString: 'insertText',
- attachMatch: grammarBlockMatch,
- needSplit: true,
- });
- } else if (functionMatch) {
- const match = functionMatch[0].split(' ')[1];
- let proposalsList = [];
- proposalsList = udfProposals.concat(
- columnsPro,
- variableProposals,
- BIVPro,
- );
- return getReturnList({
- match,
- proposals: proposalsList,
- fieldString: 'insertText',
- });
- } else if (keywordMatch) {
- const matchList = keywordMatch[0].split(' ');
- const match = matchList[matchList.length - 1];
- let proposalsList = [];
- proposalsList = hqlProposals.concat(
- BIVPro,
- CGSPro,
- udfProposals,
- columnsProposals,
- );
- return getReturnList(
- {
- match,
- proposals: proposalsList,
- fieldString: 'insertText',
- position,
- },
- monaco,
- );
- }
- return [];
- },
- });
- },
-};
diff --git a/linkis-web-next/src/components/editor/keyword/python.ts b/linkis-web-next/src/components/editor/keyword/python.ts
deleted file mode 100644
index 8245a57ec3..0000000000
--- a/linkis-web-next/src/components/editor/keyword/python.ts
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { isEmpty } from 'lodash';
-import { getHiveList, getReturnList, getFormatProposalsList } from '../util';
-
-const pyKeywordInfoProposals = [
- {
- label: 'False',
- documentation: 'Keywords',
- insertText: 'False',
- detail: 'Keywords',
- },
- {
- label: 'class',
- documentation: 'Keywords',
- insertText: 'class',
- detail: 'Keywords',
- },
- {
- label: 'finally',
- documentation: 'Keywords',
- insertText: 'finally',
- detail: 'Keywords',
- },
- {
- label: 'is',
- documentation: 'Keywords',
- insertText: 'is',
- detail: 'Keywords',
- },
- {
- label: 'return',
- documentation: 'Keywords',
- insertText: 'return',
- detail: 'Keywords',
- },
- {
- label: 'None',
- documentation: 'Keywords',
- insertText: 'None',
- detail: 'Keywords',
- },
- {
- label: 'continue',
- documentation: 'Keywords',
- insertText: 'continue',
- detail: 'Keywords',
- },
- {
- label: 'for',
- documentation: 'Keywords',
- insertText: 'for',
- detail: 'Keywords',
- },
- {
- label: 'lambda',
- documentation: 'Keywords',
- insertText: 'lambda',
- detail: 'Keywords',
- },
- {
- label: 'try',
- documentation: 'Keywords',
- insertText: 'try',
- detail: 'Keywords',
- },
- {
- label: 'True',
- documentation: 'Keywords',
- insertText: 'True',
- detail: 'Keywords',
- },
- {
- label: 'def',
- documentation: 'Keywords',
- insertText: 'def',
- detail: 'Keywords',
- },
- {
- label: 'from',
- documentation: 'Keywords',
- insertText: 'from',
- detail: 'Keywords',
- },
- {
- label: 'nonlocal',
- documentation: 'Keywords',
- insertText: 'nonlocal',
- detail: 'Keywords',
- },
- {
- label: 'while',
- documentation: 'Keywords',
- insertText: 'while',
- detail: 'Keywords',
- },
- {
- label: 'and',
- documentation: 'Keywords',
- insertText: 'and',
- detail: 'Keywords',
- },
- {
- label: 'del',
- documentation: 'Keywords',
- insertText: 'del',
- detail: 'Keywords',
- },
- {
- label: 'global',
- documentation: 'Keywords',
- insertText: 'global',
- detail: 'Keywords',
- },
- {
- label: 'not',
- documentation: 'Keywords',
- insertText: 'not',
- detail: 'Keywords',
- },
- {
- label: 'with',
- documentation: 'Keywords',
- insertText: 'with',
- detail: 'Keywords',
- },
- {
- label: 'as',
- documentation: 'Keywords',
- insertText: 'as',
- detail: 'Keywords',
- },
- {
- label: 'elif',
- documentation: 'Keywords',
- insertText: 'elif',
- detail: 'Keywords',
- },
- {
- label: 'if',
- documentation: 'Keywords',
- insertText: 'if',
- detail: 'Keywords',
- },
- {
- label: 'or',
- documentation: 'Keywords',
- insertText: 'or',
- detail: 'Keywords',
- },
- {
- label: 'yield',
- documentation: 'Keywords',
- insertText: 'yield',
- detail: 'Keywords',
- },
- {
- label: 'assert',
- documentation: 'Keywords',
- insertText: 'assert',
- detail: 'Keywords',
- },
- {
- label: 'else',
- documentation: 'Keywords',
- insertText: 'else',
- detail: 'Keywords',
- },
- {
- label: 'import',
- documentation: 'Keywords',
- insertText: 'import',
- detail: 'Keywords',
- },
- {
- label: 'pass',
- documentation: 'Keywords',
- insertText: 'pass',
- detail: 'Keywords',
- },
- {
- label: 'break',
- documentation: 'Keywords',
- insertText: 'break',
- detail: 'Keywords',
- },
- {
- label: 'except',
- documentation: 'Keywords',
- insertText: 'except',
- detail: 'Keywords',
- },
- {
- label: 'in',
- documentation: 'Keywords',
- insertText: 'in',
- detail: 'Keywords',
- },
- {
- label: 'raise',
- documentation: 'Keywords',
- insertText: 'raise',
- detail: 'Keywords',
- },
- {
- label: 'print',
- documentation: 'Keywords',
- insertText: 'print',
- detail: 'Keywords',
- },
- {
- label: 'exec',
- documentation: 'Keywords',
- insertText: 'exec',
- detail: 'Keywords',
- },
-];
-
-// Common grammatical structures(常用语法结构)
-/**
- *
- const commonGrammaticalStruCture = [
- {
- label: 'drop table',
- documentation: '删除hive表',
- insertText: 'drop table if exists {table_name};',
- detail: '常用语法结构',
- },
- {
- label: 'create table partitioned by',
- documentation: '创建hive分区表',
- insertText: 'create table {table_name} ({columns}) partitioned by ({partition}) row format delimited fields terminated by "," stored as orc;',
- detail: '常用语法结构',
- },
- {
- label: 'create table as select',
- documentation: '通过select创建表',
- insertText: 'create table {table_name} as select',
- detail: '常用语法结构',
- },
- {
- label: 'insert into table',
- documentation: '添加方式插入数据',
- insertText: 'insert into table {table_name} partition({partition})',
- detail: '常用语法结构',
- },
- {
- label: 'insert overwrite table',
- documentation: '覆盖方式插入数据',
- insertText: 'insert overwrite table {table_name} partition({partition})',
- detail: '常用语法结构',
- },
- ];
- */
-
-const buildInVariableProposals = [
- {
- label: 'run_date',
- documentation: '当前日期的前一天',
- insertText: '${run_date}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_date_std',
- documentation: '当前日期的前一天,年月日之间有横杠分割',
- insertText: '${run_date_std}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_begin',
- documentation: '当前月份的第一天',
- insertText: '${run_month_begin}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_begin_std',
- documentation: '当前月份的第一天,年月日之间有横杠分割',
- insertText: '${run_month_begin_std}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_end',
- documentation: '当前月份的最后一天',
- insertText: '${run_month_end}',
- detail: '系统内嵌变量',
- },
- {
- label: 'run_month_end_std',
- documentation: '当前月份的最后一天,年月日之间有横杠分割',
- insertText: '${run_month_end_std}',
- detail: '系统内嵌变量',
- },
-];
-
-let functionProposals = [];
-
-export default {
- async register(monaco) {
- const lang = 'python';
-
- const pyProposals = getFormatProposalsList(
- monaco,
- pyKeywordInfoProposals,
- '',
- 'Keyword',
- );
- const BIVPro = getFormatProposalsList(
- monaco,
- buildInVariableProposals,
- '',
- 'Variable',
- );
- // const CGSPro = getFormatProposalsList(monaco, commonGrammaticalStruCture, '', 'Reference');
-
- getHiveList(monaco, lang).then((list) => {
- functionProposals = list.udfProposals;
- });
-
- monaco.languages.registerCompletionItemProvider('python', {
- triggerCharacters:
- 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._'.split(
- '',
- ),
- async provideCompletionItems(model, position) {
- const needRefresh = storage.get(
- 'need-refresh-proposals-python',
- );
- if (needRefresh || isEmpty(functionProposals)) {
- const list = await getHiveList(monaco, lang);
- functionProposals = list.udfProposals;
- storage.set('need-refresh-proposals-python', false);
- }
-
- const textUntilPosition = model.getValueInRange({
- startLineNumber: position.lineNumber,
- startColumn: 1,
- endLineNumber: position.lineNumber,
- endColumn: position.column,
- });
- const keywordMatch = textUntilPosition.match(/([^"]*)?$/i);
- const functionMatch = textUntilPosition.match(/\s+/i);
- if (functionMatch) {
- const match = functionMatch[0].split(' ')[1];
- let proposalsList = [];
- proposalsList = functionProposals.concat(BIVPro);
- return getReturnList({
- match,
- proposals: proposalsList,
- fieldString: 'insertText',
- });
- } else if (keywordMatch) {
- const matchList = keywordMatch[0].split(' ');
- const match = matchList[matchList.length - 1];
- const proposalsList = pyProposals.concat(BIVPro);
- return getReturnList(
- {
- match,
- proposals: proposalsList,
- fieldString: 'insertText',
- position,
- },
- monaco,
- );
- }
- return [];
- },
- });
- },
-};
diff --git a/linkis-web-next/src/components/editor/keyword/sas.ts b/linkis-web-next/src/components/editor/keyword/sas.ts
deleted file mode 100644
index e455c54fc0..0000000000
--- a/linkis-web-next/src/components/editor/keyword/sas.ts
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import hql from './hql';
-
-const sasProposals = [
- {
- label: '%DO',
- documentation: 'sas',
- insertText: 'DO',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%UNTIL',
- documentation: 'sas',
- insertText: 'UNTIL',
- detail: 'sas宏语言关键字',
- },
- {
- label: 'GOTO',
- documentation: 'sas',
- insertText: 'GOTO',
- detail: 'sas宏语言关键字',
- },
- {
- label: 'LABEL',
- documentation: 'sas',
- insertText: 'LABEL',
- detail: 'sas宏语言关键字',
- },
- {
- label: 'LET',
- documentation: 'sas',
- insertText: 'LET',
- detail: 'sas宏语言关键字',
- },
- {
- label: 'MEND',
- documentation: 'sas',
- insertText: 'MEND',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%TO',
- documentation: 'sas',
- insertText: 'TO',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%WHILE',
- documentation: 'sas',
- insertText: 'WHILE',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%END',
- documentation: 'sas',
- insertText: 'END',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%GLOBAL',
- documentation: 'sas',
- insertText: 'GLOBAL',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%GOTO',
- documentation: 'sas',
- insertText: 'GOTO',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%IF',
- documentation: 'sas',
- insertText: 'IF',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%THEN',
- documentation: 'sas',
- insertText: 'THEN',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%ELSE',
- documentation: 'sas',
- insertText: 'ELSE',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%LABEL',
- documentation: 'sas',
- insertText: 'LABEL',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%LET',
- documentation: 'sas',
- insertText: 'LET',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%LOCAL',
- documentation: 'sas',
- insertText: 'LOCAL',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%MACRO',
- documentation: 'sas',
- insertText: 'MACRO',
- detail: 'sas宏语言关键字',
- },
- {
- label: '%MEND',
- documentation: 'sas',
- insertText: 'MEND',
- detail: 'sas宏语言关键字',
- },
-];
-
-// Inherit hql related keywords(继承hql相关的keyword)
-const kewordInfoProposals = [...hql.keyword, ...sasProposals];
-
-export default {
- register(monaco) {
- // eslint-disable-next-line no-shadow
- const sasProposals = kewordInfoProposals.map((item) => ({
- label: item.label.toLowerCase(),
- kind: monaco.languages.CompletionItemKind.Keyword,
- insertText: item.insertText.toLowerCase(),
- detail: item.detail,
- documentation: item.documentation,
- }));
-
- monaco.languages.registerCompletionItemProvider('sas', {
- triggerCharacters:
- '%abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._'.split(
- '',
- ),
- provideCompletionItems(model, position) {
- const textUntilPosition = model.getValueInRange({
- startLineNumber: position.lineNumber,
- startColumn: 1,
- endLineNumber: position.lineNumber,
- endColumn: position.column,
- });
-
- if (textUntilPosition.match(/([^"]*)?$/i)) {
- return sasProposals;
- }
-
- return [];
- },
- });
- },
-};
diff --git a/linkis-web-next/src/components/editor/keyword/sh.ts b/linkis-web-next/src/components/editor/keyword/sh.ts
deleted file mode 100644
index 1420f6d631..0000000000
--- a/linkis-web-next/src/components/editor/keyword/sh.ts
+++ /dev/null
@@ -1,570 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { getReturnList } from '../util';
-
-const shellKeywordInfoProposals = [
- {
- label: 'if',
- documentation: 'Keywords',
- insertText: 'if',
- detail: 'Keywords',
- },
- {
- label: 'then',
- documentation: 'Keywords',
- insertText: 'then',
- detail: 'Keywords',
- },
- {
- label: 'do',
- documentation: 'Keywords',
- insertText: 'do',
- detail: 'Keywords',
- },
- {
- label: 'else',
- documentation: 'Keywords',
- insertText: 'else',
- detail: 'Keywords',
- },
- {
- label: 'elif',
- documentation: 'Keywords',
- insertText: 'elif',
- detail: 'Keywords',
- },
- {
- label: 'while',
- documentation: 'Keywords',
- insertText: 'while',
- detail: 'Keywords',
- },
- {
- label: 'until',
- documentation: 'Keywords',
- insertText: 'until',
- detail: 'Keywords',
- },
- {
- label: 'for',
- documentation: 'Keywords',
- insertText: 'for',
- detail: 'Keywords',
- },
- {
- label: 'in',
- documentation: 'Keywords',
- insertText: 'in',
- detail: 'Keywords',
- },
- {
- label: 'esac',
- documentation: 'Keywords',
- insertText: 'esac',
- detail: 'Keywords',
- },
- {
- label: 'fi',
- documentation: 'Keywords',
- insertText: 'fi',
- detail: 'Keywords',
- },
- {
- label: 'fin',
- documentation: 'Keywords',
- insertText: 'fin',
- detail: 'Keywords',
- },
- {
- label: 'fil',
- documentation: 'Keywords',
- insertText: 'fil',
- detail: 'Keywords',
- },
- {
- label: 'done',
- documentation: 'Keywords',
- insertText: 'done',
- detail: 'Keywords',
- },
- {
- label: 'exit',
- documentation: 'Keywords',
- insertText: 'exit',
- detail: 'Keywords',
- },
- {
- label: 'set',
- documentation: 'Keywords',
- insertText: 'set',
- detail: 'Keywords',
- },
- {
- label: 'unset',
- documentation: 'Keywords',
- insertText: 'unset',
- detail: 'Keywords',
- },
- {
- label: 'export',
- documentation: 'Keywords',
- insertText: 'export',
- detail: 'Keywords',
- },
- {
- label: 'function',
- documentation: 'Keywords',
- insertText: 'function',
- detail: 'Keywords',
- },
- {
- label: 'awk',
- documentation: 'Builtin',
- insertText: 'awk',
- detail: 'Builtin',
- },
- {
- label: 'ab',
- documentation: 'Builtin',
- insertText: 'ab',
- detail: 'Builtin',
- },
- {
- label: 'bash',
- documentation: 'Builtin',
- insertText: 'bash',
- detail: 'Builtin',
- },
- {
- label: 'beep',
- documentation: 'Builtin',
- insertText: 'beep',
- detail: 'Builtin',
- },
- {
- label: 'cat',
- documentation: 'Builtin',
- insertText: 'cat',
- detail: 'Builtin',
- },
- {
- label: 'cc',
- documentation: 'Builtin',
- insertText: 'cc',
- detail: 'Builtin',
- },
- {
- label: 'cd',
- documentation: 'Builtin',
- insertText: 'cd',
- detail: 'Builtin',
- },
- {
- label: 'chown',
- documentation: 'Builtin',
- insertText: 'chown',
- detail: 'Builtin',
- },
- {
- label: 'chmod',
- documentation: 'Builtin',
- insertText: 'chmod',
- detail: 'Builtin',
- },
- {
- label: 'chroot',
- documentation: 'Builtin',
- insertText: 'chroot',
- detail: 'Builtin',
- },
- {
- label: 'clear',
- documentation: 'Builtin',
- insertText: 'clear',
- detail: 'Builtin',
- },
- {
- label: 'cp',
- documentation: 'Builtin',
- insertText: 'cp',
- detail: 'Builtin',
- },
- {
- label: 'curl',
- documentation: 'Builtin',
- insertText: 'curl',
- detail: 'Builtin',
- },
- {
- label: 'cut',
- documentation: 'Builtin',
- insertText: 'cut',
- detail: 'Builtin',
- },
- {
- label: 'diff',
- documentation: 'Builtin',
- insertText: 'diff',
- detail: 'Builtin',
- },
- {
- label: 'echo',
- documentation: 'Builtin',
- insertText: 'echo',
- detail: 'Builtin',
- },
- {
- label: 'find',
- documentation: 'Builtin',
- insertText: 'find',
- detail: 'Builtin',
- },
- {
- label: 'gawk',
- documentation: 'Builtin',
- insertText: 'gawk',
- detail: 'Builtin',
- },
- {
- label: 'gcc',
- documentation: 'Builtin',
- insertText: 'gcc',
- detail: 'Builtin',
- },
- {
- label: 'get',
- documentation: 'Builtin',
- insertText: 'get',
- detail: 'Builtin',
- },
- {
- label: 'git',
- documentation: 'Builtin',
- insertText: 'git',
- detail: 'Builtin',
- },
- {
- label: 'grep',
- documentation: 'Builtin',
- insertText: 'grep',
- detail: 'Builtin',
- },
- {
- label: 'hg',
- documentation: 'Builtin',
- insertText: 'hg',
- detail: 'Builtin',
- },
- {
- label: 'kill',
- documentation: 'Builtin',
- insertText: 'kill',
- detail: 'Builtin',
- },
- {
- label: 'killall',
- documentation: 'Builtin',
- insertText: 'killall',
- detail: 'Builtin',
- },
- {
- label: 'ln',
- documentation: 'Builtin',
- insertText: 'ln',
- detail: 'Builtin',
- },
- {
- label: 'ls',
- documentation: 'Builtin',
- insertText: 'ls',
- detail: 'Builtin',
- },
- {
- label: 'make',
- documentation: 'Builtin',
- insertText: 'make',
- detail: 'Builtin',
- },
- {
- label: 'mkdir',
- documentation: 'Builtin',
- insertText: 'mkdir',
- detail: 'Builtin',
- },
- {
- label: 'openssl',
- documentation: 'Builtin',
- insertText: 'openssl',
- detail: 'Builtin',
- },
- {
- label: 'mv',
- documentation: 'Builtin',
- insertText: 'mv',
- detail: 'Builtin',
- },
- {
- label: 'nc',
- documentation: 'Builtin',
- insertText: 'nc',
- detail: 'Builtin',
- },
- {
- label: 'node',
- documentation: 'Builtin',
- insertText: 'node',
- detail: 'Builtin',
- },
- {
- label: 'npm',
- documentation: 'Builtin',
- insertText: 'npm',
- detail: 'Builtin',
- },
- {
- label: 'ping',
- documentation: 'Builtin',
- insertText: 'ping',
- detail: 'Builtin',
- },
- {
- label: 'ps',
- documentation: 'Builtin',
- insertText: 'ps',
- detail: 'Builtin',
- },
- {
- label: 'restart',
- documentation: 'Builtin',
- insertText: 'restart',
- detail: 'Builtin',
- },
- {
- label: 'rm',
- documentation: 'Builtin',
- insertText: 'rm',
- detail: 'Builtin',
- },
- {
- label: 'rmdir',
- documentation: 'Builtin',
- insertText: 'rmdir',
- detail: 'Builtin',
- },
- {
- label: 'sed',
- documentation: 'Builtin',
- insertText: 'sed',
- detail: 'Builtin',
- },
- {
- label: 'service',
- documentation: 'Builtin',
- insertText: 'service',
- detail: 'Builtin',
- },
- {
- label: 'sh',
- documentation: 'Builtin',
- insertText: 'sh',
- detail: 'Builtin',
- },
- {
- label: 'shopt',
- documentation: 'Builtin',
- insertText: 'shopt',
- detail: 'Builtin',
- },
- {
- label: 'shred',
- documentation: 'Builtin',
- insertText: 'shred',
- detail: 'Builtin',
- },
- {
- label: 'source',
- documentation: 'Builtin',
- insertText: 'source',
- detail: 'Builtin',
- },
- {
- label: 'sort',
- documentation: 'Builtin',
- insertText: 'sort',
- detail: 'Builtin',
- },
- {
- label: 'sleep',
- documentation: 'Builtin',
- insertText: 'sleep',
- detail: 'Builtin',
- },
- {
- label: 'ssh',
- documentation: 'Builtin',
- insertText: 'ssh',
- detail: 'Builtin',
- },
- {
- label: 'start',
- documentation: 'Builtin',
- insertText: 'start',
- detail: 'Builtin',
- },
- {
- label: 'stop',
- documentation: 'Builtin',
- insertText: 'stop',
- detail: 'Builtin',
- },
- {
- label: 'su',
- documentation: 'Builtin',
- insertText: 'su',
- detail: 'Builtin',
- },
- {
- label: 'sudo',
- documentation: 'Builtin',
- insertText: 'sudo',
- detail: 'Builtin',
- },
- {
- label: 'svn',
- documentation: 'Builtin',
- insertText: 'svn',
- detail: 'Builtin',
- },
- {
- label: 'tee',
- documentation: 'Builtin',
- insertText: 'tee',
- detail: 'Builtin',
- },
- {
- label: 'telnet',
- documentation: 'Builtin',
- insertText: 'telnet',
- detail: 'Builtin',
- },
- {
- label: 'top',
- documentation: 'Builtin',
- insertText: 'top',
- detail: 'Builtin',
- },
- {
- label: 'touch',
- documentation: 'Builtin',
- insertText: 'touch',
- detail: 'Builtin',
- },
- {
- label: 'vi',
- documentation: 'Builtin',
- insertText: 'vi',
- detail: 'Builtin',
- },
- {
- label: 'vim',
- documentation: 'Builtin',
- insertText: 'vim',
- detail: 'Builtin',
- },
- {
- label: 'wall',
- documentation: 'Builtin',
- insertText: 'wall',
- detail: 'Builtin',
- },
- {
- label: 'wc',
- documentation: 'Builtin',
- insertText: 'wc',
- detail: 'Builtin',
- },
- {
- label: 'wget',
- documentation: 'Builtin',
- insertText: 'wget',
- detail: 'Builtin',
- },
- {
- label: 'who',
- documentation: 'Builtin',
- insertText: 'who',
- detail: 'Builtin',
- },
- {
- label: 'write',
- documentation: 'Builtin',
- insertText: 'write',
- detail: 'Builtin',
- },
- {
- label: 'yes',
- documentation: 'Builtin',
- insertText: 'yes',
- detail: 'Builtin',
- },
- {
- label: 'zsh',
- documentation: 'Builtin',
- insertText: 'zsh',
- detail: 'Builtin',
- },
-];
-
-export default {
- async register(monaco) {
- const shellProposals = shellKeywordInfoProposals.map((item) => ({
- label: item.label.toLowerCase(),
- kind: monaco.languages.CompletionItemKind.Keyword,
- insertText: item.insertText.toLowerCase(),
- detail: item.detail,
- documentation: item.documentation,
- }));
-
- monaco.languages.registerCompletionItemProvider('sh', {
- triggerCharacters:
- 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._'.split(
- '',
- ),
- async provideCompletionItems(model, position) {
- const textUntilPosition = model.getValueInRange({
- startLineNumber: position.lineNumber,
- startColumn: 1,
- endLineNumber: position.lineNumber,
- endColumn: position.column,
- });
- const keywordMatch = textUntilPosition.match(/([^"]*)?$/i);
- if (keywordMatch) {
- const matchList = keywordMatch[0].split(' ');
- const match = matchList[matchList.length - 1];
- const list = getReturnList(
- match,
- shellProposals,
- 'insertText',
- );
- return list;
- }
- return [];
- },
- });
- },
-};
diff --git a/linkis-web-next/src/components/editor/languages/hql.ts b/linkis-web-next/src/components/editor/languages/hql.ts
deleted file mode 100644
index 03368e9874..0000000000
--- a/linkis-web-next/src/components/editor/languages/hql.ts
+++ /dev/null
@@ -1,1587 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import sqlFormatter from '../sqlFormatter/sqlFormatter';
-
-const richLanguageConfiguration = {
- comments: {
- lineComment: '--',
- blockComment: ['/*', '*/'],
- },
- brackets: [
- ['{', '}'],
- ['[', ']'],
- ['(', ')'],
- ],
- autoClosingPairs: [
- { open: '{', close: '}' },
- { open: '[', close: ']' },
- { open: '(', close: ')' },
- { open: '"', close: '"' },
- { open: "'", close: "'" },
- ],
- surroundingPairs: [
- { open: '{', close: '}' },
- { open: '[', close: ']' },
- { open: '(', close: ')' },
- { open: '"', close: '"' },
- { open: "'", close: "'" },
- ],
-};
-
-const langDefinition = {
- defaultToken: '',
- tokenPostfix: '.sql',
- ignoreCase: true,
-
- brackets: [
- { open: '[', close: ']', token: 'delimiter.square' },
- { open: '(', close: ')', token: 'delimiter.parenthesis' },
- ],
-
- keywords: [
- 'ABORT_AFTER_WAIT',
- 'ABSENT',
- 'ABSOLUTE',
- 'ABORT',
- 'ACCENT_SENSITIVITY',
- 'ACTION',
- 'ACTIVATION',
- 'ACTIVE',
- 'ADD',
- 'ADDRESS',
- 'ADMIN',
- 'AES',
- 'AES_128',
- 'AES_192',
- 'AES_256',
- 'AFFINITY',
- 'AFTER',
- 'AGGREGATE',
- 'ALGORITHM',
- 'ALL_CONSTRAINTS',
- 'ALL_ERRORMSGS',
- 'ALL_INDEXES',
- 'ALL_LEVELS',
- 'ALL_SPARSE_COLUMNS',
- 'ALLOW_CONNECTIONS',
- 'ALLOW_MULTIPLE_EVENT_LOSS',
- 'ALLOW_PAGE_LOCKS',
- 'ALLOW_ROW_LOCKS',
- 'ALLOW_SINGLE_EVENT_LOSS',
- 'ALLOW_SNAPSHOT_ISOLATION',
- 'ALLOWED',
- 'ALTER',
- 'ANALYZE',
- 'ANONYMOUS',
- 'ANSI_DEFAULTS',
- 'ANSI_NULL_DEFAULT',
- 'ANSI_NULL_DFLT_OFF',
- 'ANSI_NULL_DFLT_ON',
- 'ANSI_NULLS',
- 'ANSI_PADDING',
- 'ANSI_WARNINGS',
- 'APPEND',
- 'APPLICATION',
- 'APPLICATION_LOG',
- 'ARCHIVE',
- 'ARITHABORT',
- 'ARITHIGNORE',
- 'ARRAY',
- 'AS',
- 'ASC',
- 'ASSEMBLY',
- 'ASYMMETRIC',
- 'ASYNCHRONOUS_COMMIT',
- 'AT',
- 'ATOMIC',
- 'ATTACH',
- 'ATTACH_REBUILD_LOG',
- 'AUDIT',
- 'AUDIT_GUID',
- 'AUTHENTICATION',
- 'AUTHORIZATION',
- 'AUTO',
- 'AUTOCOMMIT',
- 'AUTO_CLEANUP',
- 'AUTO_CLOSE',
- 'AUTO_CREATE_STATISTICS',
- 'AUTO_SHRINK',
- 'AUTO_UPDATE_STATISTICS',
- 'AUTO_UPDATE_STATISTICS_ASYNC',
- 'AUTOMATED_BACKUP_PREFERENCE',
- 'AUTOMATIC',
- 'AVAILABILITY',
- 'AVAILABILITY_MODE',
- 'BACKUP',
- 'BACKUP_PRIORITY',
- 'BASE64',
- 'BATCHSIZE',
- 'BEFORE',
- 'BEGIN',
- 'BEGIN_DIALOG',
- 'BIGINT',
- 'BINARY',
- 'BINDING',
- 'BIT',
- 'BLOCKERS',
- 'BLOCKSIZE',
- 'BOOLEAN',
- 'BOTH',
- 'BOUNDING_BOX',
- 'BREAK',
- 'BROKER',
- 'BROKER_INSTANCE',
- 'BROWSE',
- 'BUCKET',
- 'BUCKETS',
- 'BUCKET_COUNT',
- 'BUFFER',
- 'BUFFERCOUNT',
- 'BULK',
- 'BULK_LOGGED',
- 'BY',
- 'CACHE',
- 'CALL',
- 'CALLED',
- 'CALLER',
- 'CAP_CPU_PERCENT',
- 'CASCADE',
- 'CASE',
- 'CATALOG',
- 'CATCH',
- 'CELLS_PER_OBJECT',
- 'CERTIFICATE',
- 'CHANGE',
- 'CHANGE_RETENTION',
- 'CHANGE_TRACKING',
- 'CHANGES',
- 'CHAR',
- 'CHARACTER',
- 'CHECK',
- 'CHECK_CONSTRAINTS',
- 'CHECK_EXPIRATION',
- 'CHECK_POLICY',
- 'CHECKALLOC',
- 'CHECKCATALOG',
- 'CHECKCONSTRAINTS',
- 'CHECKDB',
- 'CHECKFILEGROUP',
- 'CHECKIDENT',
- 'CHECKPOINT',
- 'CHECKTABLE',
- 'CLASSIFIER_FUNCTION',
- 'CLEANTABLE',
- 'CLEANUP',
- 'CLEAR',
- 'CLOSE',
- 'CLUSTER',
- 'CLUSTERED',
- 'CLUSTERSTATUS',
- 'CODEPAGE',
- 'COLLATE',
- 'COLLECTION',
- 'COLUMN',
- 'COLUMN_SET',
- 'COLUMNS',
- 'COLUMNSTORE',
- 'COLUMNSTORE_ARCHIVE',
- 'COMMENT',
- 'COMMIT',
- 'COMMITTED',
- 'COMPACT',
- 'COMPACTIONS',
- 'COMPATIBILITY_LEVEL',
- 'COMPRESSION',
- 'COMPUTE',
- 'CONCAT',
- 'CONCAT_NULL_YIELDS_NULL',
- 'CONCATENATE',
- 'CONF',
- 'CONFIGURATION',
- 'CONNECT',
- 'CONSTRAINT',
- 'CONTAINMENT',
- 'CONTENT',
- 'CONTEXT',
- 'CONTINUE',
- 'CONTINUE_AFTER_ERROR',
- 'CONTRACT',
- 'CONTRACT_NAME',
- 'CONTROL',
- 'CONVERSATION',
- 'COOKIE',
- 'COPY_ONLY',
- 'COUNTER',
- 'CPU',
- 'CREATE',
- 'CREATE_NEW',
- 'CREATION_DISPOSITION',
- 'CREDENTIAL',
- 'CRYPTOGRAPHIC',
- 'CUBE',
- 'CURRENT',
- 'CURRENT_DATE',
- 'CURSOR',
- 'CURSOR_CLOSE_ON_COMMIT',
- 'CURSOR_DEFAULT',
- 'CYCLE',
- 'DATA',
- 'DATA_COMPRESSION',
- 'DATA_PURITY',
- 'DATABASE',
- 'DATABASES',
- 'DATABASE_DEFAULT',
- 'DATABASE_MIRRORING',
- 'DATABASE_SNAPSHOT',
- 'DATAFILETYPE',
- 'DATE',
- 'DATE_CORRELATION_OPTIMIZATION',
- 'DATEFIRST',
- 'DATEFORMAT',
- 'DATETIME',
- 'DATETIME2',
- 'DATETIMEOFFSET',
- 'DAY',
- 'DAYOFWEEK',
- 'DAYOFYEAR',
- 'DAYS',
- 'DB_CHAINING',
- 'DBCC',
- 'DBREINDEX',
- 'DBPROPERTIES',
- 'DDL_DATABASE_LEVEL_EVENTS',
- 'DEADLOCK_PRIORITY',
- 'DEALLOCATE',
- 'DEC',
- 'DECIMAL',
- 'DECLARE',
- 'DECRYPTION',
- 'DEFAULT',
- 'DEFAULT_DATABASE',
- 'DEFAULT_FULLTEXT_LANGUAGE',
- 'DEFAULT_LANGUAGE',
- 'DEFAULT_SCHEMA',
- 'DEFERRED',
- 'DEFINED',
- 'DEFINITION',
- 'DELAY',
- 'DELAYED_DURABILITY',
- 'DELETE',
- 'DELETED',
- 'DELIMITED',
- 'DENSITY_VECTOR',
- 'DENY',
- 'DEPENDENCY',
- 'DEPENDENTS',
- 'DES',
- 'DESC',
- 'DESCRIPTION',
- 'DESCRIBE',
- 'DESX',
- 'DETAIL',
- 'DHCP',
- 'DIAGNOSTICS',
- 'DIALOG',
- 'DIFFERENTIAL',
- 'DIRECTORIES',
- 'DIRECTORY',
- 'DIRECTORY_NAME',
- 'DISABLE',
- 'DISABLE_BROKER',
- 'DISABLED',
- 'DISK',
- 'DISTINCT',
- 'DISTRIBUTE',
- 'DISTRIBUTED',
- 'DOCUMENT',
- 'DOUBLE',
- 'DOW',
- 'DROP',
- 'DROP_EXISTING',
- 'DROPCLEANBUFFERS',
- 'DUMP',
- 'DURABILITY',
- 'DYNAMIC',
- 'EDITION',
- 'ELEMENTS',
- 'ELEM_TYPE',
- 'ELSE',
- 'EMERGENCY',
- 'EMPTY',
- 'EMPTYFILE',
- 'ENABLE',
- 'ENABLE_BROKER',
- 'ENABLED',
- 'ENCRYPTION',
- 'END',
- 'ENDPOINT',
- 'ENDPOINT_URL',
- 'ERRLVL',
- 'ERROR',
- 'ERROR_BROKER_CONVERSATIONS',
- 'ERRORFILE',
- 'ESCAPE',
- 'ESCAPED',
- 'ESTIMATEONLY',
- 'EVENT',
- 'EVENT_RETENTION_MODE',
- 'EXCHANGE',
- 'EXCLUSIVE',
- 'EXEC',
- 'EXECUTABLE',
- 'EXECUTE',
- 'EXIT',
- 'EXPAND',
- 'EXPORT',
- 'EXPIREDATE',
- 'EXPIRY_DATE',
- 'EXPLAIN',
- 'EXPLICIT',
- 'EXPRESSION',
- 'EXTENDED',
- 'EXTENDED_LOGICAL_CHECKS',
- 'EXTENSION',
- 'EXTERNAL',
- 'EXTERNAL_ACCESS',
- 'EXTRACT',
- 'FAIL_OPERATION',
- 'FAILOVER',
- 'FAILOVER_MODE',
- 'FAILURE_CONDITION_LEVEL',
- 'FALSE',
- 'FAN_IN',
- 'FAST',
- 'FAST_FORWARD',
- 'FETCH',
- 'FIELDS',
- 'FIELDTERMINATOR',
- 'FILE',
- 'FILEFORMAT',
- 'FILEGROUP',
- 'FILEGROWTH',
- 'FILELISTONLY',
- 'FILENAME',
- 'FILEPATH',
- 'FILESTREAM',
- 'FILESTREAM_ON',
- 'FILETABLE_COLLATE_FILENAME',
- 'FILETABLE_DIRECTORY',
- 'FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME',
- 'FILETABLE_NAMESPACE',
- 'FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME',
- 'FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME',
- 'FILLFACTOR',
- 'FILTERING',
- 'FIRE_TRIGGERS',
- 'FIRST',
- 'FIRSTROW',
- 'FLOAT',
- 'FMTONLY',
- 'FOLLOWING',
- 'FOR',
- 'FORCE',
- 'FORCE_FAILOVER_ALLOW_DATA_LOSS',
- 'FORCE_SERVICE_ALLOW_DATA_LOSS',
- 'FORCED',
- 'FORCEPLAN',
- 'FORCESCAN',
- 'FORCESEEK',
- 'FOREIGN',
- 'FORMATFILE',
- 'FORMATTED',
- 'FORMSOF',
- 'FORWARD_ONLY',
- 'FREE',
- 'FREEPROCCACHE',
- 'FREESESSIONCACHE',
- 'FREESYSTEMCACHE',
- 'FROM',
- 'FULL',
- 'FULLSCAN',
- 'FULLTEXT',
- 'FUNCTION',
- 'FUNCTIONS',
- 'GB',
- 'GEOGRAPHY_AUTO_GRID',
- 'GEOGRAPHY_GRID',
- 'GEOMETRY_AUTO_GRID',
- 'GEOMETRY_GRID',
- 'GET',
- 'GLOBAL',
- 'GO',
- 'GOTO',
- 'GOVERNOR',
- 'GRANT',
- 'GRIDS',
- 'GROUP',
- 'GROUP_MAX_REQUESTS',
- 'HADR',
- 'HASH',
- 'HASHED',
- 'HAVING',
- 'HEADERONLY',
- 'HEALTH_CHECK_TIMEOUT',
- 'HELP',
- 'HIERARCHYID',
- 'HIGH',
- 'HINT',
- 'HISTOGRAM',
- 'HOLDLOCK',
- 'HOLD_DDLTIME',
- 'HONOR_BROKER_PRIORITY',
- 'HOUR',
- 'HOURS',
- 'IDENTITY',
- 'IDENTITY_INSERT',
- 'IDENTITY_VALUE',
- 'IDENTITYCOL',
- 'IDXPROPERTIES',
- 'IF',
- 'IGNORE',
- 'IGNORE_CONSTRAINTS',
- 'IGNORE_DUP_KEY',
- 'IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX',
- 'IGNORE_TRIGGERS',
- 'IMAGE',
- 'IMMEDIATE',
- 'IMPERSONATE',
- 'IMPLICIT_TRANSACTIONS',
- 'IMPORT',
- 'IMPORTANCE',
- 'INCLUDE',
- 'INCREMENT',
- 'INCREMENTAL',
- 'INDEX',
- 'INDEXES',
- 'INDEXDEFRAG',
- 'INFINITE',
- 'INFLECTIONAL',
- 'INIT',
- 'INITIATOR',
- 'INPATH',
- 'INPUT',
- 'INPUTDRIVER',
- 'INPUTFORMAT',
- 'INPUTBUFFER',
- 'INSENSITIVE',
- 'INSERT',
- 'INSERTED',
- 'INSTEAD',
- 'INT',
- 'INTEGER',
- 'INTERVAL',
- 'INTO',
- 'IO',
- 'IP',
- 'ISABOUT',
- 'ISOLATION',
- 'ITEMS',
- 'JAR',
- 'JOB',
- 'KB',
- 'KEEP',
- 'KEEP_CDC',
- 'KEEP_NULLS',
- 'KEEP_REPLICATION',
- 'KEEPDEFAULTS',
- 'KEEPFIXED',
- 'KEEPIDENTITY',
- 'KEEPNULLS',
- 'KERBEROS',
- 'KEY',
- 'KEY_SOURCE',
- 'KEY_TYPE',
- 'KEYS',
- 'KEYSET',
- 'KILL',
- 'KILOBYTES_PER_BATCH',
- 'LABELONLY',
- 'LANGUAGE',
- 'LAST',
- 'LASTROW',
- 'LATERAL',
- 'LESS',
- 'LEVEL',
- 'LEVEL_1',
- 'LEVEL_2',
- 'LEVEL_3',
- 'LEVEL_4',
- 'LIFETIME',
- 'LIMIT',
- 'LINENO',
- 'LINES',
- 'LIST',
- 'LISTENER',
- 'LISTENER_IP',
- 'LISTENER_PORT',
- 'LOAD',
- 'LOADHISTORY',
- 'LOB_COMPACTION',
- 'LOCAL',
- 'LOCAL_SERVICE_NAME',
- 'LOCATION',
- 'LOCK',
- 'LOCKS',
- 'LOCK_ESCALATION',
- 'LOCK_TIMEOUT',
- 'LOGICAL',
- 'LOGIN',
- 'LOGSPACE',
- 'LONG',
- 'LOOP',
- 'LOW',
- 'MACRO',
- 'MAP',
- 'MAPJOIN',
- 'MANUAL',
- 'MARK',
- 'MARK_IN_USE_FOR_REMOVAL',
- 'MASTER',
- 'MATERIALIZED',
- 'MAX_CPU_PERCENT',
- 'MAX_DISPATCH_LATENCY',
- 'MAX_DOP',
- 'MAX_DURATION',
- 'MAX_EVENT_SIZE',
- 'MAX_FILES',
- 'MAX_IOPS_PER_VOLUME',
- 'MAX_MEMORY',
- 'MAX_MEMORY_PERCENT',
- 'MAX_QUEUE_READERS',
- 'MAX_ROLLOVER_FILES',
- 'MAX_SIZE',
- 'MAXDOP',
- 'MAXERRORS',
- 'MAXLENGTH',
- 'MAXRECURSION',
- 'MAXSIZE',
- 'MAXTRANSFERSIZE',
- 'MAXVALUE',
- 'MB',
- 'MEDIADESCRIPTION',
- 'MEDIANAME',
- 'MEDIAPASSWORD',
- 'MEDIUM',
- 'MEMBER',
- 'MEMORY_OPTIMIZED',
- 'MEMORY_OPTIMIZED_DATA',
- 'MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT',
- 'MEMORY_PARTITION_MODE',
- 'MERGE',
- 'MESSAGE',
- 'MESSAGE_FORWARD_SIZE',
- 'MESSAGE_FORWARDING',
- 'METADATA',
- 'MICROSECOND',
- 'MILLISECOND',
- 'MIN_CPU_PERCENT',
- 'MIN_IOPS_PER_VOLUME',
- 'MIN_MEMORY_PERCENT',
- 'MINUS',
- 'MINUTE',
- 'MINUTES',
- 'MINVALUE',
- 'MIRROR',
- 'MIRROR_ADDRESS',
- 'MODIFY',
- 'MONEY',
- 'MONTH',
- 'MONTHS',
- 'MORE',
- 'MOVE',
- 'MSCK',
- 'MULTI_USER',
- 'MUST_CHANGE',
- 'NAME',
- 'NANOSECOND',
- 'NATIONAL',
- 'NATIVE_COMPILATION',
- 'NCHAR',
- 'NEGOTIATE',
- 'NESTED_TRIGGERS',
- 'NEW_ACCOUNT',
- 'NEW_BROKER',
- 'NEW_PASSWORD',
- 'NEWNAME',
- 'NEXT',
- 'NO',
- 'NO_BROWSETABLE',
- 'NO_CHECKSUM',
- 'NO_COMPRESSION',
- 'NO_EVENT_LOSS',
- 'NO_INFOMSGS',
- 'NO_TRUNCATE',
- 'NO_WAIT',
- 'NOCHECK',
- 'NOCOUNT',
- 'NO_DROP',
- 'NOEXEC',
- 'NOEXPAND',
- 'NOFORMAT',
- 'NOINDEX',
- 'NOINIT',
- 'NOLOCK',
- 'NON',
- 'NON_TRANSACTED_ACCESS',
- 'NONCLUSTERED',
- 'NONE',
- 'NORECOMPUTE',
- 'NORECOVERY',
- 'NORELY',
- 'NORESEED',
- 'NORESET',
- 'NOREWIND',
- 'NORMAL',
- 'NOSCAN',
- 'NOSKIP',
- 'NOTIFICATION',
- 'NOTRUNCATE',
- 'NOUNLOAD',
- 'NOVALIDATE',
- 'NOWAIT',
- 'NTEXT',
- 'NTLM',
- 'NULLS',
- 'NUMANODE',
- 'NUMERIC',
- 'NUMERIC_ROUNDABORT',
- 'NVARCHAR',
- 'OBJECT',
- 'OF',
- 'OFF',
- 'OFFLINE',
- 'OFFSET',
- 'OFFSETS',
- 'OLD_ACCOUNT',
- 'OLD_PASSWORD',
- 'ON',
- 'ON_FAILURE',
- 'ONLINE',
- 'ONLY',
- 'OPEN',
- 'OPEN_EXISTING',
- 'OPENTRAN',
- 'OPERATOR',
- 'OPTIMISTIC',
- 'OPTIMIZE',
- 'OPTION',
- 'ORDER',
- 'OUT',
- 'OUTPUT',
- 'OUTPUTDRIVER',
- 'OUTPUTBUFFER',
- 'OUTPUTFORMAT',
- 'OVER',
- 'OVERRIDE',
- 'OWNER',
- 'OWNERSHIP',
- 'OVERWRITE',
- 'PAD_INDEX',
- 'PAGE',
- 'PAGE_VERIFY',
- 'PAGECOUNT',
- 'PAGLOCK',
- 'PARAMETERIZATION',
- 'PARSEONLY',
- 'PARTIAL',
- 'PARTIALSCAN',
- 'PARTITION',
- 'PARTITIONED',
- 'PARTITIONS',
- 'PARTNER',
- 'PASSWORD',
- 'PATH',
- 'PER_CPU',
- 'PER_NODE',
- 'PERCENT',
- 'PERMISSION_SET',
- 'PERSISTED',
- 'PHYSICAL_ONLY',
- 'PLAN',
- 'PLUS',
- 'POISON_MESSAGE_HANDLING',
- 'POOL',
- 'POPULATION',
- 'PORT',
- 'PRECEDING',
- 'PRECISION',
- 'PRETTY',
- 'PRESERVE',
- 'PRIMARY',
- 'PRIMARY_ROLE',
- 'PRINT',
- 'PRIOR',
- 'PRIORITY',
- 'PRIORITY_LEVEL',
- 'PRINCIPALS',
- 'PRIVATE',
- 'PRIVILEGES',
- 'PROC',
- 'PROCCACHE',
- 'PROCEDURE',
- 'PROCEDURE_NAME',
- 'PROCESS',
- 'PROFILE',
- 'PROPERTY',
- 'PROPERTY_DESCRIPTION',
- 'PROPERTY_INT_ID',
- 'PROPERTY_SET_GUID',
- 'PROTECTION',
- 'PROVIDER',
- 'PROVIDER_KEY_NAME',
- 'PUBLIC',
- 'PURGE',
- 'PUT',
- 'QUARTER',
- 'QUERY',
- 'QUERY_GOVERNOR_COST_LIMIT',
- 'QUEUE',
- 'QUEUE_DELAY',
- 'QUOTED_IDENTIFIER',
- 'RAISERROR',
- 'RANGE',
- 'RAW',
- 'RC2',
- 'RC4',
- 'RC4_128',
- 'READ',
- 'READ_COMMITTED_SNAPSHOT',
- 'READ_ONLY',
- 'READ_ONLY_ROUTING_LIST',
- 'READ_ONLY_ROUTING_URL',
- 'READ_WRITE',
- 'READ_WRITE_FILEGROUPS',
- 'READCOMMITTED',
- 'READCOMMITTEDLOCK',
- 'READONLY',
- 'READPAST',
- 'READS',
- 'READTEXT',
- 'READUNCOMMITTED',
- 'READWRITE',
- 'REAL',
- 'REBUILD',
- 'RECEIVE',
- 'RECOMPILE',
- 'RECONFIGURE',
- 'RECORDREADER',
- 'RECORDWRITER',
- 'RECOVERY',
- 'RECURSIVE',
- 'RECURSIVE_TRIGGERS',
- 'REDUCE',
- 'REFERENCES',
- 'REGENERATE',
- 'REGEXP',
- 'RELATED_CONVERSATION',
- 'RELATED_CONVERSATION_GROUP',
- 'RELATIVE',
- 'RELOAD',
- 'RELY',
- 'REMOTE',
- 'REMOTE_PROC_TRANSACTIONS',
- 'REMOTE_SERVICE_NAME',
- 'REMOVE',
- 'RENAME',
- 'REORGANIZE',
- 'REPAIR',
- 'REPAIR_ALLOW_DATA_LOSS',
- 'REPAIR_FAST',
- 'REPAIR_REBUILD',
- 'REPEATABLE',
- 'REPEATABLEREAD',
- 'REPLICA',
- 'REPLICATION',
- 'REQUEST_MAX_CPU_TIME_SEC',
- 'REQUEST_MAX_MEMORY_GRANT_PERCENT',
- 'REQUEST_MEMORY_GRANT_TIMEOUT_SEC',
- 'REQUIRED',
- 'RESAMPLE',
- 'RESEED',
- 'RESERVE_DISK_SPACE',
- 'RESET',
- 'RESOURCE',
- 'RESTART',
- 'RESTORE',
- 'RESTRICT',
- 'RESTRICTED_USER',
- 'RESULT',
- 'RESUME',
- 'RETAINDAYS',
- 'RETENTION',
- 'RETURN',
- 'RETURNS',
- 'REVERT',
- 'REVOKE',
- 'REWIND',
- 'REWINDONLY',
- 'REWRITE',
- 'RLIKE',
- 'ROBUST',
- 'ROLE',
- 'ROLES',
- 'ROLLBACK',
- 'ROLLUP',
- 'ROOT',
- 'ROUTE',
- 'ROW',
- 'ROWCOUNT',
- 'ROWGUIDCOL',
- 'ROWLOCK',
- 'ROWS',
- 'ROWS_PER_BATCH',
- 'ROWTERMINATOR',
- 'ROWVERSION',
- 'RSA_1024',
- 'RSA_2048',
- 'RSA_512',
- 'RULE',
- 'SAFE',
- 'SAFETY',
- 'SAMPLE',
- 'SAVE',
- 'SCHEDULER',
- 'SCHEMA',
- 'SCHEMAS',
- 'SCHEMA_AND_DATA',
- 'SCHEMA_ONLY',
- 'SCHEMABINDING',
- 'SCHEME',
- 'SCROLL',
- 'SCROLL_LOCKS',
- 'SEARCH',
- 'SECOND',
- 'SECONDARY',
- 'SECONDARY_ONLY',
- 'SECONDARY_ROLE',
- 'SECONDS',
- 'SECRET',
- 'SECURITY_LOG',
- 'SECURITYAUDIT',
- 'SELECT',
- 'SELECTIVE',
- 'SELF',
- 'SEMI',
- 'SEND',
- 'SENT',
- 'SEQUENCE',
- 'SERDE',
- 'SERDEPROPERTIES',
- 'SERIALIZABLE',
- 'SERVER',
- 'SERVICE',
- 'SERVICE_BROKER',
- 'SERVICE_NAME',
- 'SESSION',
- 'SESSION_TIMEOUT',
- 'SET',
- 'SETS',
- 'SETUSER',
- 'SHARED',
- 'SHOW',
- 'SHOW_DATABASE',
- 'SHOW_STATISTICS',
- 'SHOWCONTIG',
- 'SHOWPLAN',
- 'SHOWPLAN_ALL',
- 'SHOWPLAN_TEXT',
- 'SHOWPLAN_XML',
- 'SHRINKDATABASE',
- 'SHRINKFILE',
- 'SHUTDOWN',
- 'SID',
- 'SIGNATURE',
- 'SIMPLE',
- 'SINGLE_BLOB',
- 'SINGLE_CLOB',
- 'SINGLE_NCLOB',
- 'SINGLE_USER',
- 'SINGLETON',
- 'SIZE',
- 'SKEWED',
- 'SKIP',
- 'SMALLDATETIME',
- 'SMALLINT',
- 'SMALLMONEY',
- 'SNAPSHOT',
- 'SORT',
- 'SORTED',
- 'SORT_IN_TEMPDB',
- 'SOURCE',
- 'SPARSE',
- 'SPATIAL',
- 'SPATIAL_WINDOW_MAX_CELLS',
- 'SPECIFICATION',
- 'SPLIT',
- 'SQL',
- 'SQL_VARIANT',
- 'SQLPERF',
- 'SSL',
- 'STANDBY',
- 'START',
- 'START_DATE',
- 'STARTED',
- 'STARTUP_STATE',
- 'STAT_HEADER',
- 'STATE',
- 'STATEMENT',
- 'STATIC',
- 'STATISTICAL_SEMANTICS',
- 'STATISTICS',
- 'STATISTICS_INCREMENTAL',
- 'STATISTICS_NORECOMPUTE',
- 'STATS',
- 'STATS_STREAM',
- 'STATUS',
- 'STATUSONLY',
- 'STOP',
- 'STOP_ON_ERROR',
- 'STOPAT',
- 'STOPATMARK',
- 'STOPBEFOREMARK',
- 'STOPLIST',
- 'STOPPED',
- 'STORED',
- 'STREAMTABLE',
- 'STRING',
- 'STRUCT',
- 'SUBJECT',
- 'SUBSCRIPTION',
- 'SUMMARY',
- 'SUPPORTED',
- 'SUSPEND',
- 'SWITCH',
- 'SYMMETRIC',
- 'SYNCHRONOUS_COMMIT',
- 'SYNONYM',
- 'SYSNAME',
- 'SYSTEM',
- 'TABLE',
- 'TABLES',
- 'TABLERESULTS',
- 'TABLESAMPLE',
- 'TABLOCK',
- 'TABLOCKX',
- 'TAKE',
- 'TAPE',
- 'TARGET',
- 'TARGET_RECOVERY_TIME',
- 'TB',
- 'TBLPROPERTIES',
- 'TCP',
- 'TEMPORARY',
- 'TERMINATED',
- 'TEXT',
- 'TEXTIMAGE_ON',
- 'TEXTSIZE',
- 'THEN',
- 'THESAURUS',
- 'THROW',
- 'TIES',
- 'TIME',
- 'TIMEOUT',
- 'TIMER',
- 'TIMESTAMP',
- 'TIMESTAMPTZ',
- 'TINYINT',
- 'TO',
- 'TOP',
- 'TORN_PAGE_DETECTION',
- 'TOUCH',
- 'TRACEOFF',
- 'TRACEON',
- 'TRACESTATUS',
- 'TRACK_CAUSALITY',
- 'TRACK_COLUMNS_UPDATED',
- 'TRAN',
- 'TRANSACTION',
- 'TRANSACTIONS',
- 'TRANSFER',
- 'TRANSFORM',
- 'TRANSFORM_NOISE_WORDS',
- 'TRIGGER',
- 'TRIPLE_DES',
- 'TRIPLE_DES_3KEY',
- 'TRUE',
- 'TRUNCATE',
- 'TRUNCATEONLY',
- 'TRUSTWORTHY',
- 'TRY',
- 'TSQL',
- 'TWO_DIGIT_YEAR_CUTOFF',
- 'TYPE',
- 'TYPE_WARNING',
- 'UNARCHIVE',
- 'UNBOUNDED',
- 'UNCHECKED',
- 'UNCOMMITTED',
- 'UNDEFINED',
- 'UNDO',
- 'UNSET',
- 'UNSIGNED',
- 'UNIONTYPE',
- 'UNIQUE',
- 'UNIQUEIDENTIFIER',
- 'UNIQUEJOIN',
- 'UNKNOWN',
- 'UNLIMITED',
- 'UNLOAD',
- 'UNLOCK',
- 'UNSAFE',
- 'UPDATE',
- 'UPDATETEXT',
- 'UPDATEUSAGE',
- 'UPDLOCK',
- 'URI',
- 'URL',
- 'USE',
- 'USED',
- 'USER',
- 'USEROPTIONS',
- 'USING',
- 'UTC',
- 'UTC_TMESTAMP',
- 'UTCTIMESTAMP',
- 'VALID_XML',
- 'VALIDATE',
- 'VALIDATION',
- 'VALUE',
- 'VALUE_TYPE',
- 'VALUES',
- 'VARBINARY',
- 'VARCHAR',
- 'VARYING',
- 'VECTORIZATION',
- 'VERIFYONLY',
- 'VERSION',
- 'VIEW',
- 'VIEW_METADATA',
- 'VIEWS',
- 'VISIBILITY',
- 'WAIT_AT_LOW_PRIORITY',
- 'WAITFOR',
- 'WEEK',
- 'WEEKS',
- 'WEIGHT',
- 'WELL_FORMED_XML',
- 'WHEN',
- 'WHERE',
- 'WHILE',
- 'WINDOW',
- 'WINDOWS',
- 'WITH',
- 'WITHIN',
- 'WITHOUT',
- 'WITNESS',
- 'WORK',
- 'WORKLOAD',
- 'WRITE',
- 'WRITETEXT',
- 'XACT_ABORT',
- 'XLOCK',
- 'XMAX',
- 'XMIN',
- 'XML',
- 'XMLDATA',
- 'XMLNAMESPACES',
- 'XMLSCHEMA',
- 'XQUERY',
- 'XSINIL',
- 'YEAR',
- 'YEARS',
- 'YMAX',
- 'YMIN',
- 'ZONE',
- ],
- operators: [
- // Logical
- 'ALL',
- 'AND',
- 'ANY',
- 'BETWEEN',
- 'EXISTS',
- 'IN',
- 'LIKE',
- 'NOT',
- 'OR',
- 'SOME',
- // Set
- 'EXCEPT',
- 'INTERSECT',
- 'UNION',
- // Join
- 'APPLY',
- 'CROSS',
- 'FULL',
- 'INNER',
- 'JOIN',
- 'LEFT',
- 'OUTER',
- 'RIGHT',
- // Predicates
- 'CONTAINS',
- 'FREETEXT',
- 'IS',
- 'NULL',
- // Pivoting
- 'PIVOT',
- 'UNPIVOT',
- // Merging
- 'MATCHED',
- ],
- builtinFunctions: [
- // Aggregate
- 'AVG',
- 'CHECKSUM_AGG',
- 'COUNT',
- 'COUNT_BIG',
- 'GROUPING',
- 'GROUPING_ID',
- 'MAX',
- 'MIN',
- 'SUM',
- 'STDEV',
- 'STDEVP',
- 'VAR',
- 'VARP',
- // Analytic
- 'CUME_DIST',
- 'FIRST_VALUE',
- 'LAG',
- 'LAST_VALUE',
- 'LEAD',
- 'PERCENTILE_CONT',
- 'PERCENTILE_DISC',
- 'PERCENT_RANK',
- // Collation
- 'COLLATE',
- 'COLLATIONPROPERTY',
- 'TERTIARY_WEIGHTS',
- // Azure
- 'FEDERATION_FILTERING_VALUE',
- // Conversion
- 'CAST',
- 'CONVERT',
- 'PARSE',
- 'TRY_CAST',
- 'TRY_CONVERT',
- 'TRY_PARSE',
- // Cryptographic
- 'ASYMKEY_ID',
- 'ASYMKEYPROPERTY',
- 'CERTPROPERTY',
- 'CERT_ID',
- 'CRYPT_GEN_RANDOM',
- 'DECRYPTBYASYMKEY',
- 'DECRYPTBYCERT',
- 'DECRYPTBYKEY',
- 'DECRYPTBYKEYAUTOASYMKEY',
- 'DECRYPTBYKEYAUTOCERT',
- 'DECRYPTBYPASSPHRASE',
- 'ENCRYPTBYASYMKEY',
- 'ENCRYPTBYCERT',
- 'ENCRYPTBYKEY',
- 'ENCRYPTBYPASSPHRASE',
- 'HASHBYTES',
- 'IS_OBJECTSIGNED',
- 'KEY_GUID',
- 'KEY_ID',
- 'KEY_NAME',
- 'SIGNBYASYMKEY',
- 'SIGNBYCERT',
- 'SYMKEYPROPERTY',
- 'VERIFYSIGNEDBYCERT',
- 'VERIFYSIGNEDBYASYMKEY',
- // Cursor
- 'CURSOR_STATUS',
- // Datatype
- 'DATALENGTH',
- 'IDENT_CURRENT',
- 'IDENT_INCR',
- 'IDENT_SEED',
- 'IDENTITY',
- 'SQL_VARIANT_PROPERTY',
- // Datetime
- 'CURRENT_TIMESTAMP',
- 'DATEADD',
- 'DATEDIFF',
- 'DATEFROMPARTS',
- 'DATENAME',
- 'DATEPART',
- 'DATETIME2FROMPARTS',
- 'DATETIMEFROMPARTS',
- 'DATETIMEOFFSETFROMPARTS',
- 'DAY',
- 'EOMONTH',
- 'GETDATE',
- 'GETUTCDATE',
- 'ISDATE',
- 'MONTH',
- 'SMALLDATETIMEFROMPARTS',
- 'SWITCHOFFSET',
- 'SYSDATETIME',
- 'SYSDATETIMEOFFSET',
- 'SYSUTCDATETIME',
- 'TIMEFROMPARTS',
- 'TODATETIMEOFFSET',
- 'YEAR',
- // Logical
- 'CHOOSE',
- 'COALESCE',
- 'IIF',
- 'NULLIF',
- // Mathematical
- 'ABS',
- 'ACOS',
- 'ASIN',
- 'ATAN',
- 'ATN2',
- 'CEILING',
- 'COS',
- 'COT',
- 'DEGREES',
- 'EXP',
- 'FLOOR',
- 'LOG',
- 'LOG10',
- 'PI',
- 'POWER',
- 'RADIANS',
- 'RAND',
- 'ROUND',
- 'SIGN',
- 'SIN',
- 'SQRT',
- 'SQUARE',
- 'TAN',
- // Metadata
- 'APP_NAME',
- 'APPLOCK_MODE',
- 'APPLOCK_TEST',
- 'ASSEMBLYPROPERTY',
- 'COL_LENGTH',
- 'COL_NAME',
- 'COLUMNPROPERTY',
- 'DATABASE_PRINCIPAL_ID',
- 'DATABASEPROPERTYEX',
- 'DB_ID',
- 'DB_NAME',
- 'FILE_ID',
- 'FILE_IDEX',
- 'FILE_NAME',
- 'FILEGROUP_ID',
- 'FILEGROUP_NAME',
- 'FILEGROUPPROPERTY',
- 'FILEPROPERTY',
- 'FULLTEXTCATALOGPROPERTY',
- 'FULLTEXTSERVICEPROPERTY',
- 'INDEX_COL',
- 'INDEXKEY_PROPERTY',
- 'INDEXPROPERTY',
- 'OBJECT_DEFINITION',
- 'OBJECT_ID',
- 'OBJECT_NAME',
- 'OBJECT_SCHEMA_NAME',
- 'OBJECTPROPERTY',
- 'OBJECTPROPERTYEX',
- 'ORIGINAL_DB_NAME',
- 'PARSENAME',
- 'SCHEMA_ID',
- 'SCHEMA_NAME',
- 'SCOPE_IDENTITY',
- 'SERVERPROPERTY',
- 'STATS_DATE',
- 'TYPE_ID',
- 'TYPE_NAME',
- 'TYPEPROPERTY',
- // Ranking
- 'DENSE_RANK',
- 'NTILE',
- 'RANK',
- 'ROW_NUMBER',
- // Replication
- 'PUBLISHINGSERVERNAME',
- // Rowset
- 'OPENDATASOURCE',
- 'OPENQUERY',
- 'OPENROWSET',
- 'OPENXML',
- // Security
- 'CERTENCODED',
- 'CERTPRIVATEKEY',
- 'CURRENT_USER',
- 'HAS_DBACCESS',
- 'HAS_PERMS_BY_NAME',
- 'IS_MEMBER',
- 'IS_ROLEMEMBER',
- 'IS_SRVROLEMEMBER',
- 'LOGINPROPERTY',
- 'ORIGINAL_LOGIN',
- 'PERMISSIONS',
- 'PWDENCRYPT',
- 'PWDCOMPARE',
- 'SESSION_USER',
- 'SESSIONPROPERTY',
- 'SUSER_ID',
- 'SUSER_NAME',
- 'SUSER_SID',
- 'SUSER_SNAME',
- 'SYSTEM_USER',
- 'USER',
- 'USER_ID',
- 'USER_NAME',
- // String
- 'ASCII',
- 'CHAR',
- 'CHARINDEX',
- 'CONCAT',
- 'DIFFERENCE',
- 'FORMAT',
- 'LEFT',
- 'LEN',
- 'LOWER',
- 'LTRIM',
- 'NCHAR',
- 'PATINDEX',
- 'QUOTENAME',
- 'REPLACE',
- 'REPLICATE',
- 'REVERSE',
- 'RIGHT',
- 'RTRIM',
- 'SOUNDEX',
- 'SPACE',
- 'STR',
- 'STUFF',
- 'SUBSTRING',
- 'UNICODE',
- 'UPPER',
- // System
- 'BINARY_CHECKSUM',
- 'CHECKSUM',
- 'CONNECTIONPROPERTY',
- 'CONTEXT_INFO',
- 'CURRENT_REQUEST_ID',
- 'ERROR_LINE',
- 'ERROR_NUMBER',
- 'ERROR_MESSAGE',
- 'ERROR_PROCEDURE',
- 'ERROR_SEVERITY',
- 'ERROR_STATE',
- 'FORMATMESSAGE',
- 'GETANSINULL',
- 'GET_FILESTREAM_TRANSACTION_CONTEXT',
- 'HOST_ID',
- 'HOST_NAME',
- 'ISNULL',
- 'ISNUMERIC',
- 'MIN_ACTIVE_ROWVERSION',
- 'NEWID',
- 'NEWSEQUENTIALID',
- 'ROWCOUNT_BIG',
- 'XACT_STATE',
- // TextImage
- 'TEXTPTR',
- 'TEXTVALID',
- // Trigger
- 'COLUMNS_UPDATED',
- 'EVENTDATA',
- 'TRIGGER_NESTLEVEL',
- 'UPDATE',
- // ChangeTracking
- 'CHANGETABLE',
- 'CHANGE_TRACKING_CONTEXT',
- 'CHANGE_TRACKING_CURRENT_VERSION',
- 'CHANGE_TRACKING_IS_COLUMN_IN_MASK',
- 'CHANGE_TRACKING_MIN_VALID_VERSION',
- // FullTextSearch
- 'CONTAINSTABLE',
- 'FREETEXTTABLE',
- // SemanticTextSearch
- 'SEMANTICKEYPHRASETABLE',
- 'SEMANTICSIMILARITYDETAILSTABLE',
- 'SEMANTICSIMILARITYTABLE',
- // FileStream
- 'FILETABLEROOTPATH',
- 'GETFILENAMESPACEPATH',
- 'GETPATHLOCATOR',
- 'PATHNAME',
- // ServiceBroker
- 'GET_TRANSMISSION_STATUS',
- ],
- builtinVariables: [
- // Configuration
- '@@DATEFIRST',
- '@@DBTS',
- '@@LANGID',
- '@@LANGUAGE',
- '@@LOCK_TIMEOUT',
- '@@MAX_CONNECTIONS',
- '@@MAX_PRECISION',
- '@@NESTLEVEL',
- '@@OPTIONS',
- '@@REMSERVER',
- '@@SERVERNAME',
- '@@SERVICENAME',
- '@@SPID',
- '@@TEXTSIZE',
- '@@VERSION',
- // Cursor
- '@@CURSOR_ROWS',
- '@@FETCH_STATUS',
- // Datetime
- '@@DATEFIRST',
- // Metadata
- '@@PROCID',
- // System
- '@@ERROR',
- '@@IDENTITY',
- '@@ROWCOUNT',
- '@@TRANCOUNT',
- // Stats
- '@@CONNECTIONS',
- '@@CPU_BUSY',
- '@@IDLE',
- '@@IO_BUSY',
- '@@PACKET_ERRORS',
- '@@PACK_RECEIVED',
- '@@PACK_SENT',
- '@@TIMETICKS',
- '@@TOTAL_ERRORS',
- '@@TOTAL_READ',
- '@@TOTAL_WRITE',
- ],
- pseudoColumns: ['$ACTION', '$IDENTITY', '$ROWGUID', '$PARTITION'],
- tokenizer: {
- root: [
- { include: '@comments' },
- { include: '@whitespace' },
- { include: '@pseudoColumns' },
- { include: '@numbers' },
- { include: '@strings' },
- { include: '@complexIdentifiers' },
- { include: '@scopes' },
- [/[;,.]/, 'delimiter'],
- [/[()]/, '@brackets'],
- [
- /[\w@#$]+/,
- {
- cases: {
- '@keywords': 'keyword',
- '@operators': 'operator',
- '@builtinVariables': 'predefined',
- '@builtinFunctions': 'predefined',
- '@default': 'identifier',
- },
- },
- ],
- [/[<>=!%&+\-*/|~^]/, 'operator'],
- ],
- whitespace: [[/\s+/, 'white']],
- comments: [
- [/--+.*/, 'comment'],
- [/\/\*/, { token: 'comment.quote', next: '@comment' }],
- ],
- comment: [
- [/[^*/]+/, 'comment'],
- // Not supporting nested comments, as nested comments seem to not be standard?
- // i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
- // [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
- [/\*\//, { token: 'comment.quote', next: '@pop' }],
- [/./, 'comment'],
- ],
- pseudoColumns: [
- [
- /[$][A-Za-z_][\w@#$]*/,
- {
- cases: {
- '@pseudoColumns': 'predefined',
- '@default': 'identifier',
- },
- },
- ],
- ],
- numbers: [
- [/0[xX][0-9a-fA-F]*/, 'number'],
- [/[$][+-]*\d*(\.\d*)?/, 'number'],
- [/((\d+(\.\d*)?)|(\.\d+))([eE][-+]?\d+)?/, 'number'],
- ],
- strings: [
- [/N'/, { token: 'string', next: '@string' }],
- [/'/, { token: 'string', next: '@string' }],
- ],
- string: [
- [/[^']+/, 'string'],
- [/''/, 'string'],
- [/'/, { token: 'string', next: '@pop' }],
- ],
- complexIdentifiers: [
- [/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],
- [/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }],
- ],
- bracketedIdentifier: [
- [/[^\]]+/, 'identifier'],
- [/]]/, 'identifier'],
- [/]/, { token: 'identifier.quote', next: '@pop' }],
- ],
- quotedIdentifier: [
- [/[^"]+/, 'identifier'],
- [/""/, 'identifier'],
- [/"/, { token: 'identifier.quote', next: '@pop' }],
- ],
- scopes: [
- [/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i, 'keyword'],
- [/BEGIN\s+TRY\b/i, { token: 'keyword.try' }],
- [/END\s+TRY\b/i, { token: 'keyword.try' }],
- [/BEGIN\s+CATCH\b/i, { token: 'keyword.catch' }],
- [/END\s+CATCH\b/i, { token: 'keyword.catch' }],
- [/(BEGIN|CASE)\b/i, { token: 'keyword.block' }],
- [/END\b/i, { token: 'keyword.block' }],
- [/WHEN\b/i, { token: 'keyword.choice' }],
- [/THEN\b/i, { token: 'keyword.choice' }],
- ],
- },
-};
-
-export default {
- config: richLanguageConfiguration,
- definition: langDefinition,
- register(monaco) {
- monaco.languages.register({ id: 'hql' });
- monaco.languages.setLanguageConfiguration(
- 'hql',
- richLanguageConfiguration,
- );
- monaco.languages.setMonarchTokensProvider('hql', langDefinition);
-
- // handle formatting(处理格式化)
- monaco.languages.registerDocumentFormattingEditProvider('hql', {
- provideDocumentFormattingEdits: function (model) {
- let range = model.getFullModelRange();
- let value = model.getValue();
- let newValue = sqlFormatter.format(value);
- return [
- {
- range: range,
- text: newValue,
- },
- ];
- },
- });
- },
-};
diff --git a/linkis-web-next/src/components/editor/languages/out.ts b/linkis-web-next/src/components/editor/languages/out.ts
deleted file mode 100644
index 70569b51b4..0000000000
--- a/linkis-web-next/src/components/editor/languages/out.ts
+++ /dev/null
@@ -1,1570 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const richLanguageConfiguration = {
- comments: {
- lineComment: '--',
- blockComment: ['/*', '*/'],
- },
- brackets: [
- ['{', '}'],
- ['[', ']'],
- ['(', ')'],
- ],
- autoClosingPairs: [
- { open: '{', close: '}' },
- { open: '[', close: ']' },
- { open: '(', close: ')' },
- { open: '"', close: '"' },
- { open: "'", close: "'" },
- ],
- surroundingPairs: [
- { open: '{', close: '}' },
- { open: '[', close: ']' },
- { open: '(', close: ')' },
- { open: '"', close: '"' },
- { open: "'", close: "'" },
- ],
-};
-
-const langDefinition = {
- defaultToken: '',
- tokenPostfix: '.out',
- ignoreCase: true,
-
- brackets: [
- { open: '[', close: ']', token: 'delimiter.square' },
- { open: '(', close: ')', token: 'delimiter.parenthesis' },
- ],
-
- keywords: [
- 'ABORT_AFTER_WAIT',
- 'ABSENT',
- 'ABSOLUTE',
- 'ABORT',
- 'ACCENT_SENSITIVITY',
- 'ACTION',
- 'ACTIVATION',
- 'ACTIVE',
- 'ADD',
- 'ADDRESS',
- 'ADMIN',
- 'AES',
- 'AES_128',
- 'AES_192',
- 'AES_256',
- 'AFFINITY',
- 'AFTER',
- 'AGGREGATE',
- 'ALGORITHM',
- 'ALL_CONSTRAINTS',
- 'ALL_ERRORMSGS',
- 'ALL_INDEXES',
- 'ALL_LEVELS',
- 'ALL_SPARSE_COLUMNS',
- 'ALLOW_CONNECTIONS',
- 'ALLOW_MULTIPLE_EVENT_LOSS',
- 'ALLOW_PAGE_LOCKS',
- 'ALLOW_ROW_LOCKS',
- 'ALLOW_SINGLE_EVENT_LOSS',
- 'ALLOW_SNAPSHOT_ISOLATION',
- 'ALLOWED',
- 'ALTER',
- 'ANALYZE',
- 'ANONYMOUS',
- 'ANSI_DEFAULTS',
- 'ANSI_NULL_DEFAULT',
- 'ANSI_NULL_DFLT_OFF',
- 'ANSI_NULL_DFLT_ON',
- 'ANSI_NULLS',
- 'ANSI_PADDING',
- 'ANSI_WARNINGS',
- 'APPEND',
- 'APPLICATION',
- 'APPLICATION_LOG',
- 'ARCHIVE',
- 'ARITHABORT',
- 'ARITHIGNORE',
- 'ARRAY',
- 'AS',
- 'ASC',
- 'ASSEMBLY',
- 'ASYMMETRIC',
- 'ASYNCHRONOUS_COMMIT',
- 'AT',
- 'ATOMIC',
- 'ATTACH',
- 'ATTACH_REBUILD_LOG',
- 'AUDIT',
- 'AUDIT_GUID',
- 'AUTHENTICATION',
- 'AUTHORIZATION',
- 'AUTO',
- 'AUTOCOMMIT',
- 'AUTO_CLEANUP',
- 'AUTO_CLOSE',
- 'AUTO_CREATE_STATISTICS',
- 'AUTO_SHRINK',
- 'AUTO_UPDATE_STATISTICS',
- 'AUTO_UPDATE_STATISTICS_ASYNC',
- 'AUTOMATED_BACKUP_PREFERENCE',
- 'AUTOMATIC',
- 'AVAILABILITY',
- 'AVAILABILITY_MODE',
- 'BACKUP',
- 'BACKUP_PRIORITY',
- 'BASE64',
- 'BATCHSIZE',
- 'BEFORE',
- 'BEGIN',
- 'BEGIN_DIALOG',
- 'BIGINT',
- 'BINARY',
- 'BINDING',
- 'BIT',
- 'BLOCKERS',
- 'BLOCKSIZE',
- 'BOOLEAN',
- 'BOTH',
- 'BOUNDING_BOX',
- 'BREAK',
- 'BROKER',
- 'BROKER_INSTANCE',
- 'BROWSE',
- 'BUCKET',
- 'BUCKETS',
- 'BUCKET_COUNT',
- 'BUFFER',
- 'BUFFERCOUNT',
- 'BULK',
- 'BULK_LOGGED',
- 'BY',
- 'CACHE',
- 'CALL',
- 'CALLED',
- 'CALLER',
- 'CAP_CPU_PERCENT',
- 'CASCADE',
- 'CASE',
- 'CATALOG',
- 'CATCH',
- 'CELLS_PER_OBJECT',
- 'CERTIFICATE',
- 'CHANGE',
- 'CHANGE_RETENTION',
- 'CHANGE_TRACKING',
- 'CHANGES',
- 'CHAR',
- 'CHARACTER',
- 'CHECK',
- 'CHECK_CONSTRAINTS',
- 'CHECK_EXPIRATION',
- 'CHECK_POLICY',
- 'CHECKALLOC',
- 'CHECKCATALOG',
- 'CHECKCONSTRAINTS',
- 'CHECKDB',
- 'CHECKFILEGROUP',
- 'CHECKIDENT',
- 'CHECKPOINT',
- 'CHECKTABLE',
- 'CLASSIFIER_FUNCTION',
- 'CLEANTABLE',
- 'CLEANUP',
- 'CLEAR',
- 'CLOSE',
- 'CLUSTER',
- 'CLUSTERED',
- 'CLUSTERSTATUS',
- 'CODEPAGE',
- 'COLLATE',
- 'COLLECTION',
- 'COLUMN',
- 'COLUMN_SET',
- 'COLUMNS',
- 'COLUMNSTORE',
- 'COLUMNSTORE_ARCHIVE',
- 'COMMENT',
- 'COMMIT',
- 'COMMITTED',
- 'COMPACT',
- 'COMPACTIONS',
- 'COMPATIBILITY_LEVEL',
- 'COMPRESSION',
- 'COMPUTE',
- 'CONCAT',
- 'CONCAT_NULL_YIELDS_NULL',
- 'CONCATENATE',
- 'CONF',
- 'CONFIGURATION',
- 'CONNECT',
- 'CONSTRAINT',
- 'CONTAINMENT',
- 'CONTENT',
- 'CONTEXT',
- 'CONTINUE',
- 'CONTINUE_AFTER_ERROR',
- 'CONTRACT',
- 'CONTRACT_NAME',
- 'CONTROL',
- 'CONVERSATION',
- 'COOKIE',
- 'COPY_ONLY',
- 'COUNTER',
- 'CPU',
- 'CREATE',
- 'CREATE_NEW',
- 'CREATION_DISPOSITION',
- 'CREDENTIAL',
- 'CRYPTOGRAPHIC',
- 'CUBE',
- 'CURRENT',
- 'CURRENT_DATE',
- 'CURSOR',
- 'CURSOR_CLOSE_ON_COMMIT',
- 'CURSOR_DEFAULT',
- 'CYCLE',
- 'DATA',
- 'DATA_COMPRESSION',
- 'DATA_PURITY',
- 'DATABASE',
- 'DATABASES',
- 'DATABASE_DEFAULT',
- 'DATABASE_MIRRORING',
- 'DATABASE_SNAPSHOT',
- 'DATAFILETYPE',
- 'DATE',
- 'DATE_CORRELATION_OPTIMIZATION',
- 'DATEFIRST',
- 'DATEFORMAT',
- 'DATETIME',
- 'DATETIME2',
- 'DATETIMEOFFSET',
- 'DAY',
- 'DAYOFWEEK',
- 'DAYOFYEAR',
- 'DAYS',
- 'DB_CHAINING',
- 'DBCC',
- 'DBREINDEX',
- 'DBPROPERTIES',
- 'DDL_DATABASE_LEVEL_EVENTS',
- 'DEADLOCK_PRIORITY',
- 'DEALLOCATE',
- 'DEC',
- 'DECIMAL',
- 'DECLARE',
- 'DECRYPTION',
- 'DEFAULT',
- 'DEFAULT_DATABASE',
- 'DEFAULT_FULLTEXT_LANGUAGE',
- 'DEFAULT_LANGUAGE',
- 'DEFAULT_SCHEMA',
- 'DEFERRED',
- 'DEFINED',
- 'DEFINITION',
- 'DELAY',
- 'DELAYED_DURABILITY',
- 'DELETE',
- 'DELETED',
- 'DELIMITED',
- 'DENSITY_VECTOR',
- 'DENY',
- 'DEPENDENCY',
- 'DEPENDENTS',
- 'DES',
- 'DESC',
- 'DESCRIPTION',
- 'DESCRIBE',
- 'DESX',
- 'DETAIL',
- 'DHCP',
- 'DIAGNOSTICS',
- 'DIALOG',
- 'DIFFERENTIAL',
- 'DIRECTORIES',
- 'DIRECTORY',
- 'DIRECTORY_NAME',
- 'DISABLE',
- 'DISABLE_BROKER',
- 'DISABLED',
- 'DISK',
- 'DISTINCT',
- 'DISTRIBUTE',
- 'DISTRIBUTED',
- 'DOCUMENT',
- 'DOUBLE',
- 'DOW',
- 'DROP',
- 'DROP_EXISTING',
- 'DROPCLEANBUFFERS',
- 'DUMP',
- 'DURABILITY',
- 'DYNAMIC',
- 'EDITION',
- 'ELEMENTS',
- 'ELEM_TYPE',
- 'ELSE',
- 'EMERGENCY',
- 'EMPTY',
- 'EMPTYFILE',
- 'ENABLE',
- 'ENABLE_BROKER',
- 'ENABLED',
- 'ENCRYPTION',
- 'END',
- 'ENDPOINT',
- 'ENDPOINT_URL',
- 'ERRLVL',
- 'ERROR',
- 'ERROR_BROKER_CONVERSATIONS',
- 'ERRORFILE',
- 'ESCAPE',
- 'ESCAPED',
- 'ESTIMATEONLY',
- 'EVENT',
- 'EVENT_RETENTION_MODE',
- 'EXCHANGE',
- 'EXCLUSIVE',
- 'EXEC',
- 'EXECUTABLE',
- 'EXECUTE',
- 'EXIT',
- 'EXPAND',
- 'EXPORT',
- 'EXPIREDATE',
- 'EXPIRY_DATE',
- 'EXPLAIN',
- 'EXPLICIT',
- 'EXPRESSION',
- 'EXTENDED',
- 'EXTENDED_LOGICAL_CHECKS',
- 'EXTENSION',
- 'EXTERNAL',
- 'EXTERNAL_ACCESS',
- 'EXTRACT',
- 'FAIL_OPERATION',
- 'FAILOVER',
- 'FAILOVER_MODE',
- 'FAILURE_CONDITION_LEVEL',
- 'FALSE',
- 'FAN_IN',
- 'FAST',
- 'FAST_FORWARD',
- 'FETCH',
- 'FIELDS',
- 'FIELDTERMINATOR',
- 'FILE',
- 'FILEFORMAT',
- 'FILEGROUP',
- 'FILEGROWTH',
- 'FILELISTONLY',
- 'FILENAME',
- 'FILEPATH',
- 'FILESTREAM',
- 'FILESTREAM_ON',
- 'FILETABLE_COLLATE_FILENAME',
- 'FILETABLE_DIRECTORY',
- 'FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME',
- 'FILETABLE_NAMESPACE',
- 'FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME',
- 'FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME',
- 'FILLFACTOR',
- 'FILTERING',
- 'FIRE_TRIGGERS',
- 'FIRST',
- 'FIRSTROW',
- 'FLOAT',
- 'FMTONLY',
- 'FOLLOWING',
- 'FOR',
- 'FORCE',
- 'FORCE_FAILOVER_ALLOW_DATA_LOSS',
- 'FORCE_SERVICE_ALLOW_DATA_LOSS',
- 'FORCED',
- 'FORCEPLAN',
- 'FORCESCAN',
- 'FORCESEEK',
- 'FOREIGN',
- 'FORMATFILE',
- 'FORMATTED',
- 'FORMSOF',
- 'FORWARD_ONLY',
- 'FREE',
- 'FREEPROCCACHE',
- 'FREESESSIONCACHE',
- 'FREESYSTEMCACHE',
- 'FROM',
- 'FULL',
- 'FULLSCAN',
- 'FULLTEXT',
- 'FUNCTION',
- 'FUNCTIONS',
- 'GB',
- 'GEOGRAPHY_AUTO_GRID',
- 'GEOGRAPHY_GRID',
- 'GEOMETRY_AUTO_GRID',
- 'GEOMETRY_GRID',
- 'GET',
- 'GLOBAL',
- 'GO',
- 'GOTO',
- 'GOVERNOR',
- 'GRANT',
- 'GRIDS',
- 'GROUP',
- 'GROUP_MAX_REQUESTS',
- 'HADR',
- 'HASH',
- 'HASHED',
- 'HAVING',
- 'HEADERONLY',
- 'HEALTH_CHECK_TIMEOUT',
- 'HELP',
- 'HIERARCHYID',
- 'HIGH',
- 'HINT',
- 'HISTOGRAM',
- 'HOLDLOCK',
- 'HOLD_DDLTIME',
- 'HONOR_BROKER_PRIORITY',
- 'HOUR',
- 'HOURS',
- 'IDENTITY',
- 'IDENTITY_INSERT',
- 'IDENTITY_VALUE',
- 'IDENTITYCOL',
- 'IDXPROPERTIES',
- 'IF',
- 'IGNORE',
- 'IGNORE_CONSTRAINTS',
- 'IGNORE_DUP_KEY',
- 'IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX',
- 'IGNORE_TRIGGERS',
- 'IMAGE',
- 'IMMEDIATE',
- 'IMPERSONATE',
- 'IMPLICIT_TRANSACTIONS',
- 'IMPORT',
- 'IMPORTANCE',
- 'INCLUDE',
- 'INCREMENT',
- 'INCREMENTAL',
- 'INDEX',
- 'INDEXES',
- 'INDEXDEFRAG',
- 'INFINITE',
- 'INFLECTIONAL',
- 'INIT',
- 'INITIATOR',
- 'INPATH',
- 'INPUT',
- 'INPUTDRIVER',
- 'INPUTFORMAT',
- 'INPUTBUFFER',
- 'INSENSITIVE',
- 'INSERT',
- 'INSERTED',
- 'INSTEAD',
- 'INT',
- 'INTEGER',
- 'INTERVAL',
- 'INTO',
- 'IO',
- 'IP',
- 'ISABOUT',
- 'ISOLATION',
- 'ITEMS',
- 'JAR',
- 'JOB',
- 'KB',
- 'KEEP',
- 'KEEP_CDC',
- 'KEEP_NULLS',
- 'KEEP_REPLICATION',
- 'KEEPDEFAULTS',
- 'KEEPFIXED',
- 'KEEPIDENTITY',
- 'KEEPNULLS',
- 'KERBEROS',
- 'KEY',
- 'KEY_SOURCE',
- 'KEY_TYPE',
- 'KEYS',
- 'KEYSET',
- 'KILL',
- 'KILOBYTES_PER_BATCH',
- 'LABELONLY',
- 'LANGUAGE',
- 'LAST',
- 'LASTROW',
- 'LATERAL',
- 'LESS',
- 'LEVEL',
- 'LEVEL_1',
- 'LEVEL_2',
- 'LEVEL_3',
- 'LEVEL_4',
- 'LIFETIME',
- 'LIMIT',
- 'LINENO',
- 'LINES',
- 'LIST',
- 'LISTENER',
- 'LISTENER_IP',
- 'LISTENER_PORT',
- 'LOAD',
- 'LOADHISTORY',
- 'LOB_COMPACTION',
- 'LOCAL',
- 'LOCAL_SERVICE_NAME',
- 'LOCATION',
- 'LOCK',
- 'LOCKS',
- 'LOCK_ESCALATION',
- 'LOCK_TIMEOUT',
- 'LOGICAL',
- 'LOGIN',
- 'LOGSPACE',
- 'LONG',
- 'LOOP',
- 'LOW',
- 'MACRO',
- 'MAP',
- 'MAPJOIN',
- 'MANUAL',
- 'MARK',
- 'MARK_IN_USE_FOR_REMOVAL',
- 'MASTER',
- 'MATERIALIZED',
- 'MAX_CPU_PERCENT',
- 'MAX_DISPATCH_LATENCY',
- 'MAX_DOP',
- 'MAX_DURATION',
- 'MAX_EVENT_SIZE',
- 'MAX_FILES',
- 'MAX_IOPS_PER_VOLUME',
- 'MAX_MEMORY',
- 'MAX_MEMORY_PERCENT',
- 'MAX_QUEUE_READERS',
- 'MAX_ROLLOVER_FILES',
- 'MAX_SIZE',
- 'MAXDOP',
- 'MAXERRORS',
- 'MAXLENGTH',
- 'MAXRECURSION',
- 'MAXSIZE',
- 'MAXTRANSFERSIZE',
- 'MAXVALUE',
- 'MB',
- 'MEDIADESCRIPTION',
- 'MEDIANAME',
- 'MEDIAPASSWORD',
- 'MEDIUM',
- 'MEMBER',
- 'MEMORY_OPTIMIZED',
- 'MEMORY_OPTIMIZED_DATA',
- 'MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT',
- 'MEMORY_PARTITION_MODE',
- 'MERGE',
- 'MESSAGE',
- 'MESSAGE_FORWARD_SIZE',
- 'MESSAGE_FORWARDING',
- 'METADATA',
- 'MICROSECOND',
- 'MILLISECOND',
- 'MIN_CPU_PERCENT',
- 'MIN_IOPS_PER_VOLUME',
- 'MIN_MEMORY_PERCENT',
- 'MINUS',
- 'MINUTE',
- 'MINUTES',
- 'MINVALUE',
- 'MIRROR',
- 'MIRROR_ADDRESS',
- 'MODIFY',
- 'MONEY',
- 'MONTH',
- 'MONTHS',
- 'MORE',
- 'MOVE',
- 'MSCK',
- 'MULTI_USER',
- 'MUST_CHANGE',
- 'NAME',
- 'NANOSECOND',
- 'NATIONAL',
- 'NATIVE_COMPILATION',
- 'NCHAR',
- 'NEGOTIATE',
- 'NESTED_TRIGGERS',
- 'NEW_ACCOUNT',
- 'NEW_BROKER',
- 'NEW_PASSWORD',
- 'NEWNAME',
- 'NEXT',
- 'NO',
- 'NO_BROWSETABLE',
- 'NO_CHECKSUM',
- 'NO_COMPRESSION',
- 'NO_EVENT_LOSS',
- 'NO_INFOMSGS',
- 'NO_TRUNCATE',
- 'NO_WAIT',
- 'NOCHECK',
- 'NOCOUNT',
- 'NO_DROP',
- 'NOEXEC',
- 'NOEXPAND',
- 'NOFORMAT',
- 'NOINDEX',
- 'NOINIT',
- 'NOLOCK',
- 'NON',
- 'NON_TRANSACTED_ACCESS',
- 'NONCLUSTERED',
- 'NONE',
- 'NORECOMPUTE',
- 'NORECOVERY',
- 'NORELY',
- 'NORESEED',
- 'NORESET',
- 'NOREWIND',
- 'NORMAL',
- 'NOSCAN',
- 'NOSKIP',
- 'NOTIFICATION',
- 'NOTRUNCATE',
- 'NOUNLOAD',
- 'NOVALIDATE',
- 'NOWAIT',
- 'NTEXT',
- 'NTLM',
- 'NULLS',
- 'NUMANODE',
- 'NUMERIC',
- 'NUMERIC_ROUNDABORT',
- 'NVARCHAR',
- 'OBJECT',
- 'OF',
- 'OFF',
- 'OFFLINE',
- 'OFFSET',
- 'OFFSETS',
- 'OLD_ACCOUNT',
- 'OLD_PASSWORD',
- 'ON',
- 'ON_FAILURE',
- 'ONLINE',
- 'ONLY',
- 'OPEN',
- 'OPEN_EXISTING',
- 'OPENTRAN',
- 'OPERATOR',
- 'OPTIMISTIC',
- 'OPTIMIZE',
- 'OPTION',
- 'ORDER',
- 'OUT',
- 'OUTPUT',
- 'OUTPUTDRIVER',
- 'OUTPUTBUFFER',
- 'OUTPUTFORMAT',
- 'OVER',
- 'OVERRIDE',
- 'OWNER',
- 'OWNERSHIP',
- 'OVERWRITE',
- 'PAD_INDEX',
- 'PAGE',
- 'PAGE_VERIFY',
- 'PAGECOUNT',
- 'PAGLOCK',
- 'PARAMETERIZATION',
- 'PARSEONLY',
- 'PARTIAL',
- 'PARTIALSCAN',
- 'PARTITION',
- 'PARTITIONED',
- 'PARTITIONS',
- 'PARTNER',
- 'PASSWORD',
- 'PATH',
- 'PER_CPU',
- 'PER_NODE',
- 'PERCENT',
- 'PERMISSION_SET',
- 'PERSISTED',
- 'PHYSICAL_ONLY',
- 'PLAN',
- 'PLUS',
- 'POISON_MESSAGE_HANDLING',
- 'POOL',
- 'POPULATION',
- 'PORT',
- 'PRECEDING',
- 'PRECISION',
- 'PRETTY',
- 'PRESERVE',
- 'PRIMARY',
- 'PRIMARY_ROLE',
- 'PRINT',
- 'PRIOR',
- 'PRIORITY',
- 'PRIORITY_LEVEL',
- 'PRINCIPALS',
- 'PRIVATE',
- 'PRIVILEGES',
- 'PROC',
- 'PROCCACHE',
- 'PROCEDURE',
- 'PROCEDURE_NAME',
- 'PROCESS',
- 'PROFILE',
- 'PROPERTY',
- 'PROPERTY_DESCRIPTION',
- 'PROPERTY_INT_ID',
- 'PROPERTY_SET_GUID',
- 'PROTECTION',
- 'PROVIDER',
- 'PROVIDER_KEY_NAME',
- 'PUBLIC',
- 'PURGE',
- 'PUT',
- 'QUARTER',
- 'QUERY',
- 'QUERY_GOVERNOR_COST_LIMIT',
- 'QUEUE',
- 'QUEUE_DELAY',
- 'QUOTED_IDENTIFIER',
- 'RAISERROR',
- 'RANGE',
- 'RAW',
- 'RC2',
- 'RC4',
- 'RC4_128',
- 'READ',
- 'READ_COMMITTED_SNAPSHOT',
- 'READ_ONLY',
- 'READ_ONLY_ROUTING_LIST',
- 'READ_ONLY_ROUTING_URL',
- 'READ_WRITE',
- 'READ_WRITE_FILEGROUPS',
- 'READCOMMITTED',
- 'READCOMMITTEDLOCK',
- 'READONLY',
- 'READPAST',
- 'READS',
- 'READTEXT',
- 'READUNCOMMITTED',
- 'READWRITE',
- 'REAL',
- 'REBUILD',
- 'RECEIVE',
- 'RECOMPILE',
- 'RECONFIGURE',
- 'RECORDREADER',
- 'RECORDWRITER',
- 'RECOVERY',
- 'RECURSIVE',
- 'RECURSIVE_TRIGGERS',
- 'REDUCE',
- 'REFERENCES',
- 'REGENERATE',
- 'REGEXP',
- 'RELATED_CONVERSATION',
- 'RELATED_CONVERSATION_GROUP',
- 'RELATIVE',
- 'RELOAD',
- 'RELY',
- 'REMOTE',
- 'REMOTE_PROC_TRANSACTIONS',
- 'REMOTE_SERVICE_NAME',
- 'REMOVE',
- 'RENAME',
- 'REORGANIZE',
- 'REPAIR',
- 'REPAIR_ALLOW_DATA_LOSS',
- 'REPAIR_FAST',
- 'REPAIR_REBUILD',
- 'REPEATABLE',
- 'REPEATABLEREAD',
- 'REPLICA',
- 'REPLICATION',
- 'REQUEST_MAX_CPU_TIME_SEC',
- 'REQUEST_MAX_MEMORY_GRANT_PERCENT',
- 'REQUEST_MEMORY_GRANT_TIMEOUT_SEC',
- 'REQUIRED',
- 'RESAMPLE',
- 'RESEED',
- 'RESERVE_DISK_SPACE',
- 'RESET',
- 'RESOURCE',
- 'RESTART',
- 'RESTORE',
- 'RESTRICT',
- 'RESTRICTED_USER',
- 'RESULT',
- 'RESUME',
- 'RETAINDAYS',
- 'RETENTION',
- 'RETURN',
- 'RETURNS',
- 'REVERT',
- 'REVOKE',
- 'REWIND',
- 'REWINDONLY',
- 'REWRITE',
- 'RLIKE',
- 'ROBUST',
- 'ROLE',
- 'ROLES',
- 'ROLLBACK',
- 'ROLLUP',
- 'ROOT',
- 'ROUTE',
- 'ROW',
- 'ROWCOUNT',
- 'ROWGUIDCOL',
- 'ROWLOCK',
- 'ROWS',
- 'ROWS_PER_BATCH',
- 'ROWTERMINATOR',
- 'ROWVERSION',
- 'RSA_1024',
- 'RSA_2048',
- 'RSA_512',
- 'RULE',
- 'SAFE',
- 'SAFETY',
- 'SAMPLE',
- 'SAVE',
- 'SCHEDULER',
- 'SCHEMA',
- 'SCHEMAS',
- 'SCHEMA_AND_DATA',
- 'SCHEMA_ONLY',
- 'SCHEMABINDING',
- 'SCHEME',
- 'SCROLL',
- 'SCROLL_LOCKS',
- 'SEARCH',
- 'SECOND',
- 'SECONDARY',
- 'SECONDARY_ONLY',
- 'SECONDARY_ROLE',
- 'SECONDS',
- 'SECRET',
- 'SECURITY_LOG',
- 'SECURITYAUDIT',
- 'SELECT',
- 'SELECTIVE',
- 'SELF',
- 'SEMI',
- 'SEND',
- 'SENT',
- 'SEQUENCE',
- 'SERDE',
- 'SERDEPROPERTIES',
- 'SERIALIZABLE',
- 'SERVER',
- 'SERVICE',
- 'SERVICE_BROKER',
- 'SERVICE_NAME',
- 'SESSION',
- 'SESSION_TIMEOUT',
- 'SET',
- 'SETS',
- 'SETUSER',
- 'SHARED',
- 'SHOW',
- 'SHOW_DATABASE',
- 'SHOW_STATISTICS',
- 'SHOWCONTIG',
- 'SHOWPLAN',
- 'SHOWPLAN_ALL',
- 'SHOWPLAN_TEXT',
- 'SHOWPLAN_XML',
- 'SHRINKDATABASE',
- 'SHRINKFILE',
- 'SHUTDOWN',
- 'SID',
- 'SIGNATURE',
- 'SIMPLE',
- 'SINGLE_BLOB',
- 'SINGLE_CLOB',
- 'SINGLE_NCLOB',
- 'SINGLE_USER',
- 'SINGLETON',
- 'SIZE',
- 'SKEWED',
- 'SKIP',
- 'SMALLDATETIME',
- 'SMALLINT',
- 'SMALLMONEY',
- 'SNAPSHOT',
- 'SORT',
- 'SORTED',
- 'SORT_IN_TEMPDB',
- 'SOURCE',
- 'SPARSE',
- 'SPATIAL',
- 'SPATIAL_WINDOW_MAX_CELLS',
- 'SPECIFICATION',
- 'SPLIT',
- 'SQL',
- 'SQL_VARIANT',
- 'SQLPERF',
- 'SSL',
- 'STANDBY',
- 'START',
- 'START_DATE',
- 'STARTED',
- 'STARTUP_STATE',
- 'STAT_HEADER',
- 'STATE',
- 'STATEMENT',
- 'STATIC',
- 'STATISTICAL_SEMANTICS',
- 'STATISTICS',
- 'STATISTICS_INCREMENTAL',
- 'STATISTICS_NORECOMPUTE',
- 'STATS',
- 'STATS_STREAM',
- 'STATUS',
- 'STATUSONLY',
- 'STOP',
- 'STOP_ON_ERROR',
- 'STOPAT',
- 'STOPATMARK',
- 'STOPBEFOREMARK',
- 'STOPLIST',
- 'STOPPED',
- 'STORED',
- 'STREAMTABLE',
- 'STRING',
- 'STRUCT',
- 'SUBJECT',
- 'SUBSCRIPTION',
- 'SUMMARY',
- 'SUPPORTED',
- 'SUSPEND',
- 'SWITCH',
- 'SYMMETRIC',
- 'SYNCHRONOUS_COMMIT',
- 'SYNONYM',
- 'SYSNAME',
- 'SYSTEM',
- 'TABLE',
- 'TABLES',
- 'TABLERESULTS',
- 'TABLESAMPLE',
- 'TABLOCK',
- 'TABLOCKX',
- 'TAKE',
- 'TAPE',
- 'TARGET',
- 'TARGET_RECOVERY_TIME',
- 'TB',
- 'TBLPROPERTIES',
- 'TCP',
- 'TEMPORARY',
- 'TERMINATED',
- 'TEXT',
- 'TEXTIMAGE_ON',
- 'TEXTSIZE',
- 'THEN',
- 'THESAURUS',
- 'THROW',
- 'TIES',
- 'TIME',
- 'TIMEOUT',
- 'TIMER',
- 'TIMESTAMP',
- 'TIMESTAMPTZ',
- 'TINYINT',
- 'TO',
- 'TOP',
- 'TORN_PAGE_DETECTION',
- 'TOUCH',
- 'TRACEOFF',
- 'TRACEON',
- 'TRACESTATUS',
- 'TRACK_CAUSALITY',
- 'TRACK_COLUMNS_UPDATED',
- 'TRAN',
- 'TRANSACTION',
- 'TRANSACTIONS',
- 'TRANSFER',
- 'TRANSFORM',
- 'TRANSFORM_NOISE_WORDS',
- 'TRIGGER',
- 'TRIPLE_DES',
- 'TRIPLE_DES_3KEY',
- 'TRUE',
- 'TRUNCATE',
- 'TRUNCATEONLY',
- 'TRUSTWORTHY',
- 'TRY',
- 'TSQL',
- 'TWO_DIGIT_YEAR_CUTOFF',
- 'TYPE',
- 'TYPE_WARNING',
- 'UNARCHIVE',
- 'UNBOUNDED',
- 'UNCHECKED',
- 'UNCOMMITTED',
- 'UNDEFINED',
- 'UNDO',
- 'UNSET',
- 'UNSIGNED',
- 'UNIONTYPE',
- 'UNIQUE',
- 'UNIQUEIDENTIFIER',
- 'UNIQUEJOIN',
- 'UNKNOWN',
- 'UNLIMITED',
- 'UNLOAD',
- 'UNLOCK',
- 'UNSAFE',
- 'UPDATE',
- 'UPDATETEXT',
- 'UPDATEUSAGE',
- 'UPDLOCK',
- 'URI',
- 'URL',
- 'USE',
- 'USED',
- 'USER',
- 'USEROPTIONS',
- 'USING',
- 'UTC',
- 'UTC_TMESTAMP',
- 'UTCTIMESTAMP',
- 'VALID_XML',
- 'VALIDATE',
- 'VALIDATION',
- 'VALUE',
- 'VALUE_TYPE',
- 'VALUES',
- 'VARBINARY',
- 'VARCHAR',
- 'VARYING',
- 'VECTORIZATION',
- 'VERIFYONLY',
- 'VERSION',
- 'VIEW',
- 'VIEW_METADATA',
- 'VIEWS',
- 'VISIBILITY',
- 'WAIT_AT_LOW_PRIORITY',
- 'WAITFOR',
- 'WEEK',
- 'WEEKS',
- 'WEIGHT',
- 'WELL_FORMED_XML',
- 'WHEN',
- 'WHERE',
- 'WHILE',
- 'WINDOW',
- 'WINDOWS',
- 'WITH',
- 'WITHIN',
- 'WITHOUT',
- 'WITNESS',
- 'WORK',
- 'WORKLOAD',
- 'WRITE',
- 'WRITETEXT',
- 'XACT_ABORT',
- 'XLOCK',
- 'XMAX',
- 'XMIN',
- 'XML',
- 'XMLDATA',
- 'XMLNAMESPACES',
- 'XMLSCHEMA',
- 'XQUERY',
- 'XSINIL',
- 'YEAR',
- 'YEARS',
- 'YMAX',
- 'YMIN',
- 'ZONE',
- ],
- operators: [
- // Logical
- 'ALL',
- 'AND',
- 'ANY',
- 'BETWEEN',
- 'EXISTS',
- 'IN',
- 'LIKE',
- 'NOT',
- 'OR',
- 'SOME',
- // Set
- 'EXCEPT',
- 'INTERSECT',
- 'UNION',
- // Join
- 'APPLY',
- 'CROSS',
- 'FULL',
- 'INNER',
- 'JOIN',
- 'LEFT',
- 'OUTER',
- 'RIGHT',
- // Predicates
- 'CONTAINS',
- 'FREETEXT',
- 'IS',
- 'NULL',
- // Pivoting
- 'PIVOT',
- 'UNPIVOT',
- // Merging
- 'MATCHED',
- ],
- builtinFunctions: [
- // Aggregate
- 'AVG',
- 'CHECKSUM_AGG',
- 'COUNT',
- 'COUNT_BIG',
- 'GROUPING',
- 'GROUPING_ID',
- 'MAX',
- 'MIN',
- 'SUM',
- 'STDEV',
- 'STDEVP',
- 'VAR',
- 'VARP',
- // Analytic
- 'CUME_DIST',
- 'FIRST_VALUE',
- 'LAG',
- 'LAST_VALUE',
- 'LEAD',
- 'PERCENTILE_CONT',
- 'PERCENTILE_DISC',
- 'PERCENT_RANK',
- // Collation
- 'COLLATE',
- 'COLLATIONPROPERTY',
- 'TERTIARY_WEIGHTS',
- // Azure
- 'FEDERATION_FILTERING_VALUE',
- // Conversion
- 'CAST',
- 'CONVERT',
- 'PARSE',
- 'TRY_CAST',
- 'TRY_CONVERT',
- 'TRY_PARSE',
- // Cryptographic
- 'ASYMKEY_ID',
- 'ASYMKEYPROPERTY',
- 'CERTPROPERTY',
- 'CERT_ID',
- 'CRYPT_GEN_RANDOM',
- 'DECRYPTBYASYMKEY',
- 'DECRYPTBYCERT',
- 'DECRYPTBYKEY',
- 'DECRYPTBYKEYAUTOASYMKEY',
- 'DECRYPTBYKEYAUTOCERT',
- 'DECRYPTBYPASSPHRASE',
- 'ENCRYPTBYASYMKEY',
- 'ENCRYPTBYCERT',
- 'ENCRYPTBYKEY',
- 'ENCRYPTBYPASSPHRASE',
- 'HASHBYTES',
- 'IS_OBJECTSIGNED',
- 'KEY_GUID',
- 'KEY_ID',
- 'KEY_NAME',
- 'SIGNBYASYMKEY',
- 'SIGNBYCERT',
- 'SYMKEYPROPERTY',
- 'VERIFYSIGNEDBYCERT',
- 'VERIFYSIGNEDBYASYMKEY',
- // Cursor
- 'CURSOR_STATUS',
- // Datatype
- 'DATALENGTH',
- 'IDENT_CURRENT',
- 'IDENT_INCR',
- 'IDENT_SEED',
- 'IDENTITY',
- 'SQL_VARIANT_PROPERTY',
- // Datetime
- 'CURRENT_TIMESTAMP',
- 'DATEADD',
- 'DATEDIFF',
- 'DATEFROMPARTS',
- 'DATENAME',
- 'DATEPART',
- 'DATETIME2FROMPARTS',
- 'DATETIMEFROMPARTS',
- 'DATETIMEOFFSETFROMPARTS',
- 'DAY',
- 'EOMONTH',
- 'GETDATE',
- 'GETUTCDATE',
- 'ISDATE',
- 'MONTH',
- 'SMALLDATETIMEFROMPARTS',
- 'SWITCHOFFSET',
- 'SYSDATETIME',
- 'SYSDATETIMEOFFSET',
- 'SYSUTCDATETIME',
- 'TIMEFROMPARTS',
- 'TODATETIMEOFFSET',
- 'YEAR',
- // Logical
- 'CHOOSE',
- 'COALESCE',
- 'IIF',
- 'NULLIF',
- // Mathematical
- 'ABS',
- 'ACOS',
- 'ASIN',
- 'ATAN',
- 'ATN2',
- 'CEILING',
- 'COS',
- 'COT',
- 'DEGREES',
- 'EXP',
- 'FLOOR',
- 'LOG',
- 'LOG10',
- 'PI',
- 'POWER',
- 'RADIANS',
- 'RAND',
- 'ROUND',
- 'SIGN',
- 'SIN',
- 'SQRT',
- 'SQUARE',
- 'TAN',
- // Metadata
- 'APP_NAME',
- 'APPLOCK_MODE',
- 'APPLOCK_TEST',
- 'ASSEMBLYPROPERTY',
- 'COL_LENGTH',
- 'COL_NAME',
- 'COLUMNPROPERTY',
- 'DATABASE_PRINCIPAL_ID',
- 'DATABASEPROPERTYEX',
- 'DB_ID',
- 'DB_NAME',
- 'FILE_ID',
- 'FILE_IDEX',
- 'FILE_NAME',
- 'FILEGROUP_ID',
- 'FILEGROUP_NAME',
- 'FILEGROUPPROPERTY',
- 'FILEPROPERTY',
- 'FULLTEXTCATALOGPROPERTY',
- 'FULLTEXTSERVICEPROPERTY',
- 'INDEX_COL',
- 'INDEXKEY_PROPERTY',
- 'INDEXPROPERTY',
- 'OBJECT_DEFINITION',
- 'OBJECT_ID',
- 'OBJECT_NAME',
- 'OBJECT_SCHEMA_NAME',
- 'OBJECTPROPERTY',
- 'OBJECTPROPERTYEX',
- 'ORIGINAL_DB_NAME',
- 'PARSENAME',
- 'SCHEMA_ID',
- 'SCHEMA_NAME',
- 'SCOPE_IDENTITY',
- 'SERVERPROPERTY',
- 'STATS_DATE',
- 'TYPE_ID',
- 'TYPE_NAME',
- 'TYPEPROPERTY',
- // Ranking
- 'DENSE_RANK',
- 'NTILE',
- 'RANK',
- 'ROW_NUMBER',
- // Replication
- 'PUBLISHINGSERVERNAME',
- // Rowset
- 'OPENDATASOURCE',
- 'OPENQUERY',
- 'OPENROWSET',
- 'OPENXML',
- // Security
- 'CERTENCODED',
- 'CERTPRIVATEKEY',
- 'CURRENT_USER',
- 'HAS_DBACCESS',
- 'HAS_PERMS_BY_NAME',
- 'IS_MEMBER',
- 'IS_ROLEMEMBER',
- 'IS_SRVROLEMEMBER',
- 'LOGINPROPERTY',
- 'ORIGINAL_LOGIN',
- 'PERMISSIONS',
- 'PWDENCRYPT',
- 'PWDCOMPARE',
- 'SESSION_USER',
- 'SESSIONPROPERTY',
- 'SUSER_ID',
- 'SUSER_NAME',
- 'SUSER_SID',
- 'SUSER_SNAME',
- 'SYSTEM_USER',
- 'USER',
- 'USER_ID',
- 'USER_NAME',
- // String
- 'ASCII',
- 'CHAR',
- 'CHARINDEX',
- 'CONCAT',
- 'DIFFERENCE',
- 'FORMAT',
- 'LEFT',
- 'LEN',
- 'LOWER',
- 'LTRIM',
- 'NCHAR',
- 'PATINDEX',
- 'QUOTENAME',
- 'REPLACE',
- 'REPLICATE',
- 'REVERSE',
- 'RIGHT',
- 'RTRIM',
- 'SOUNDEX',
- 'SPACE',
- 'STR',
- 'STUFF',
- 'SUBSTRING',
- 'UNICODE',
- 'UPPER',
- // System
- 'BINARY_CHECKSUM',
- 'CHECKSUM',
- 'CONNECTIONPROPERTY',
- 'CONTEXT_INFO',
- 'CURRENT_REQUEST_ID',
- 'ERROR_LINE',
- 'ERROR_NUMBER',
- 'ERROR_MESSAGE',
- 'ERROR_PROCEDURE',
- 'ERROR_SEVERITY',
- 'ERROR_STATE',
- 'FORMATMESSAGE',
- 'GETANSINULL',
- 'GET_FILESTREAM_TRANSACTION_CONTEXT',
- 'HOST_ID',
- 'HOST_NAME',
- 'ISNULL',
- 'ISNUMERIC',
- 'MIN_ACTIVE_ROWVERSION',
- 'NEWID',
- 'NEWSEQUENTIALID',
- 'ROWCOUNT_BIG',
- 'XACT_STATE',
- // TextImage
- 'TEXTPTR',
- 'TEXTVALID',
- // Trigger
- 'COLUMNS_UPDATED',
- 'EVENTDATA',
- 'TRIGGER_NESTLEVEL',
- 'UPDATE',
- // ChangeTracking
- 'CHANGETABLE',
- 'CHANGE_TRACKING_CONTEXT',
- 'CHANGE_TRACKING_CURRENT_VERSION',
- 'CHANGE_TRACKING_IS_COLUMN_IN_MASK',
- 'CHANGE_TRACKING_MIN_VALID_VERSION',
- // FullTextSearch
- 'CONTAINSTABLE',
- 'FREETEXTTABLE',
- // SemanticTextSearch
- 'SEMANTICKEYPHRASETABLE',
- 'SEMANTICSIMILARITYDETAILSTABLE',
- 'SEMANTICSIMILARITYTABLE',
- // FileStream
- 'FILETABLEROOTPATH',
- 'GETFILENAMESPACEPATH',
- 'GETPATHLOCATOR',
- 'PATHNAME',
- // ServiceBroker
- 'GET_TRANSMISSION_STATUS',
- ],
- builtinVariables: [
- // Configuration
- '@@DATEFIRST',
- '@@DBTS',
- '@@LANGID',
- '@@LANGUAGE',
- '@@LOCK_TIMEOUT',
- '@@MAX_CONNECTIONS',
- '@@MAX_PRECISION',
- '@@NESTLEVEL',
- '@@OPTIONS',
- '@@REMSERVER',
- '@@SERVERNAME',
- '@@SERVICENAME',
- '@@SPID',
- '@@TEXTSIZE',
- '@@VERSION',
- // Cursor
- '@@CURSOR_ROWS',
- '@@FETCH_STATUS',
- // Datetime
- '@@DATEFIRST',
- // Metadata
- '@@PROCID',
- // System
- '@@ERROR',
- '@@IDENTITY',
- '@@ROWCOUNT',
- '@@TRANCOUNT',
- // Stats
- '@@CONNECTIONS',
- '@@CPU_BUSY',
- '@@IDLE',
- '@@IO_BUSY',
- '@@PACKET_ERRORS',
- '@@PACK_RECEIVED',
- '@@PACK_SENT',
- '@@TIMETICKS',
- '@@TOTAL_ERRORS',
- '@@TOTAL_READ',
- '@@TOTAL_WRITE',
- ],
- pseudoColumns: ['$ACTION', '$IDENTITY', '$ROWGUID', '$PARTITION'],
- tokenizer: {
- root: [
- { include: '@comments' },
- { include: '@whitespace' },
- { include: '@pseudoColumns' },
- { include: '@numbers' },
- { include: '@strings' },
- { include: '@complexIdentifiers' },
- { include: '@scopes' },
- [/[;,.]/, 'delimiter'],
- [/[()]/, '@brackets'],
- [
- /[\w@#$]+/,
- {
- cases: {
- '@keywords': 'keyword',
- '@operators': 'operator',
- '@builtinVariables': 'predefined',
- '@builtinFunctions': 'predefined',
- '@default': 'identifier',
- },
- },
- ],
- [/[<>=!%&+\-*/|~^]/, 'operator'],
- ],
- whitespace: [[/\s+/, 'white']],
- comments: [
- [/--+.*/, 'comment'],
- [/\/\*/, { token: 'comment.quote', next: '@comment' }],
- ],
- comment: [
- [/[^*/]+/, 'comment'],
- // Not supporting nested comments, as nested comments seem to not be standard?
- // i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
- // [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
- [/\*\//, { token: 'comment.quote', next: '@pop' }],
- [/./, 'comment'],
- ],
- pseudoColumns: [
- [
- /[$][A-Za-z_][\w@#$]*/,
- {
- cases: {
- '@pseudoColumns': 'predefined',
- '@default': 'identifier',
- },
- },
- ],
- ],
- numbers: [
- [/0[xX][0-9a-fA-F]*/, 'number'],
- [/[$][+-]*\d*(\.\d*)?/, 'number'],
- [/((\d+(\.\d*)?)|(\.\d+))([eE][-+]?\d+)?/, 'number'],
- ],
- strings: [
- [/N'/, { token: 'string', next: '@string' }],
- [/'/, { token: 'string', next: '@string' }],
- ],
- string: [
- [/[^']+/, 'string'],
- [/''/, 'string'],
- [/'/, { token: 'string', next: '@pop' }],
- ],
- complexIdentifiers: [
- [/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],
- [/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }],
- ],
- bracketedIdentifier: [
- [/[^\]]+/, 'identifier'],
- [/]]/, 'identifier'],
- [/]/, { token: 'identifier.quote', next: '@pop' }],
- ],
- quotedIdentifier: [
- [/[^"]+/, 'identifier'],
- [/""/, 'identifier'],
- [/"/, { token: 'identifier.quote', next: '@pop' }],
- ],
- scopes: [
- [/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i, 'keyword'],
- [/BEGIN\s+TRY\b/i, { token: 'keyword.try' }],
- [/END\s+TRY\b/i, { token: 'keyword.try' }],
- [/BEGIN\s+CATCH\b/i, { token: 'keyword.catch' }],
- [/END\s+CATCH\b/i, { token: 'keyword.catch' }],
- [/(BEGIN|CASE)\b/i, { token: 'keyword.block' }],
- [/END\b/i, { token: 'keyword.block' }],
- [/WHEN\b/i, { token: 'keyword.choice' }],
- [/THEN\b/i, { token: 'keyword.choice' }],
- ],
- },
-};
-
-export default {
- config: richLanguageConfiguration,
- definition: langDefinition,
- register(monaco) {
- monaco.languages.register({ id: 'out' });
- monaco.languages.setLanguageConfiguration(
- 'out',
- richLanguageConfiguration,
- );
- monaco.languages.setMonarchTokensProvider('out', langDefinition);
- },
-};
diff --git a/linkis-web-next/src/components/editor/languages/sas.ts b/linkis-web-next/src/components/editor/languages/sas.ts
deleted file mode 100644
index 038f2ea95d..0000000000
--- a/linkis-web-next/src/components/editor/languages/sas.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-import hql from './hql.js';
-import sqlFormatter from '../sqlFormatter/sqlFormatter';
-
-const sasDefinition = {
- keywords: [
- '%DO',
- '%UNTIL',
- '%TO',
- '%WHILE',
- '%END',
- '%GLOBAL',
- '%GOTO',
- '%IF',
- '%THEN',
- '%ELSE',
- '%LABEL',
- '%LET',
- '%LOCAL',
- '%MACRO',
- '%MEND',
- ],
-};
-
-export default {
- register(monaco) {
- // Inherit and merge hql related keywords(继承和合并hql相关的keyword)
- const langDefinition = hql.definition;
- langDefinition.keywords.concat(sasDefinition);
- monaco.languages.register({ id: 'sas' });
- monaco.languages.setLanguageConfiguration('sas', hql.config);
- monaco.languages.setMonarchTokensProvider('sas', langDefinition);
-
- // handle formatting(处理格式化)
- monaco.languages.registerDocumentFormattingEditProvider('sas', {
- provideDocumentFormattingEdits: function(model) {
- let range = model.getFullModelRange();
- let value = model.getValue();
- let newValue = sqlFormatter.format(value);
- return [
- {
- range: range,
- text: newValue,
- },
- ];
- },
- });
- },
-};
diff --git a/linkis-web-next/src/components/editor/languages/sh.ts b/linkis-web-next/src/components/editor/languages/sh.ts
deleted file mode 100644
index 823c63c48b..0000000000
--- a/linkis-web-next/src/components/editor/languages/sh.ts
+++ /dev/null
@@ -1,220 +0,0 @@
-/* eslint-disable quotes */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export const conf = {
- comments: {
- lineComment: '#',
- },
- brackets: [
- ['{', '}'],
- ['[', ']'],
- ['(', ')'],
- ],
- autoClosingPairs: [
- { open: '{', close: '}' },
- { open: '[', close: ']' },
- { open: '(', close: ')' },
- { open: '"', close: '"' },
- { open: "'", close: "'" },
- { open: '`', close: '`' },
- ],
- surroundingPairs: [
- { open: '{', close: '}' },
- { open: '[', close: ']' },
- { open: '(', close: ')' },
- { open: '"', close: '"' },
- { open: "'", close: "'" },
- { open: '`', close: '`' },
- ],
-};
-export const language = {
- defaultToken: '',
- ignoreCase: true,
- tokenPostfix: '.shell',
- brackets: [
- { token: 'delimiter.bracket', open: '{', close: '}' },
- { token: 'delimiter.parenthesis', open: '(', close: ')' },
- { token: 'delimiter.square', open: '[', close: ']' },
- ],
- keywords: [
- 'if',
- 'then',
- 'do',
- 'else',
- 'elif',
- 'while',
- 'until',
- 'for',
- 'in',
- 'esac',
- 'fi',
- 'fin',
- 'fil',
- 'done',
- 'exit',
- 'set',
- 'unset',
- 'export',
- 'function',
- ],
- builtins: [
- 'ab',
- 'awk',
- 'bash',
- 'beep',
- 'cat',
- 'cc',
- 'cd',
- 'chown',
- 'chmod',
- 'chroot',
- 'clear',
- 'cp',
- 'curl',
- 'cut',
- 'diff',
- 'echo',
- 'find',
- 'gawk',
- 'gcc',
- 'get',
- 'git',
- 'grep',
- 'hg',
- 'kill',
- 'killall',
- 'ln',
- 'ls',
- 'make',
- 'mkdir',
- 'openssl',
- 'mv',
- 'nc',
- 'node',
- 'npm',
- 'ping',
- 'ps',
- 'restart',
- 'rm',
- 'rmdir',
- 'sed',
- 'service',
- 'sh',
- 'shopt',
- 'shred',
- 'source',
- 'sort',
- 'sleep',
- 'ssh',
- 'start',
- 'stop',
- 'su',
- 'sudo',
- 'svn',
- 'tee',
- 'telnet',
- 'top',
- 'touch',
- 'vi',
- 'vim',
- 'wall',
- 'wc',
- 'wget',
- 'who',
- 'write',
- 'yes',
- 'zsh',
- ],
- // we include these common regular expressions
- symbols: /[=> {
- return lang.id === 'hql';
+ return lang.id === 'log';
});
if (!findLang) {
- // Register languages(注册languages)
- hql.register(monaco);
+ // register languages(注册languages)
log.register(monaco);
- sas.register(monaco);
- sh.register(monaco);
- out.register(monaco);
// register theme(注册theme)
defaultView.register(monaco);
logview.register(monaco);
-
- // (Register Keyword Prediction)
- hqlKeyword.register(monaco);
- pythonKeyword.register(monaco);
- sasKeyword.register(monaco);
- shKeyword.register(monaco);
}
export default monaco;
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/core/Formatter.ts b/linkis-web-next/src/components/editor/sqlFormatter/core/Formatter.ts
deleted file mode 100644
index 56c79ae3d7..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/core/Formatter.ts
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import trimEnd from 'lodash/trimEnd';
-import tokenTypes from './tokenTypes';
-import Indentation from './Indentation';
-import InlineBlock from './InlineBlock';
-import Params from './Params';
-
-/**
- *
- */
-export default class Formatter {
- /**
- * @param {Object} cfg
- * @param {Object} cfg.indent
- * @param {Object} cfg.params
- * @param {Tokenizer} tokenizer
- */
- constructor(cfg, tokenizer) {
- this.cfg = cfg || {};
- this.indentation = new Indentation(this.cfg.indent);
- this.inlineBlock = new InlineBlock();
- this.params = new Params(this.cfg.params);
- this.tokenizer = tokenizer;
- this.previousReservedWord = {};
- this.tokens = [];
- this.index = 0;
- }
-
- /**
- * Formats whitespaces in a SQL string to make it easier to read.
- *
- * @param {String} query The SQL query string
- * @return {String} formatted query
- */
- format(query) {
- this.tokens = this.tokenizer.tokenize(query);
- const formattedQuery = this.getFormattedQueryFromTokens();
- return formattedQuery.trim();
- }
-
- /**
- * @return {*}
- */
- getFormattedQueryFromTokens() {
- let formattedQuery = '';
- this.tokens.forEach((token, index) => {
- this.index = index;
- if (token.type === tokenTypes.WHITESPACE) {
- // ignore (we do our own whitespace formatting)
- } else if (token.type === tokenTypes.LINE_COMMENT) {
- formattedQuery = this.formatLineComment(token, formattedQuery);
- } else if (token.type === tokenTypes.BLOCK_COMMENT) {
- formattedQuery = this.formatBlockComment(token, formattedQuery);
- } else if (token.type === tokenTypes.RESERVED_TOPLEVEL) {
- formattedQuery = this.formatToplevelReservedWord(
- token,
- formattedQuery,
- );
- this.previousReservedWord = token;
- } else if (token.type === tokenTypes.RESERVED_NEWLINE) {
- formattedQuery = this.formatNewlineReservedWord(
- token,
- formattedQuery,
- );
- this.previousReservedWord = token;
- } else if (token.type === tokenTypes.RESERVED) {
- formattedQuery = this.formatWithSpaces(token, formattedQuery);
- this.previousReservedWord = token;
- } else if (token.type === tokenTypes.OPEN_PAREN) {
- formattedQuery = this.formatOpeningParentheses(
- token,
- formattedQuery,
- );
- } else if (token.type === tokenTypes.CLOSE_PAREN) {
- formattedQuery = this.formatClosingParentheses(
- token,
- formattedQuery,
- );
- } else if (token.type === tokenTypes.PLACEHOLDER) {
- formattedQuery = this.formatPlaceholder(token, formattedQuery);
- } else if (token.value === ',') {
- formattedQuery = this.formatComma(token, formattedQuery);
- } else if (token.value === ':') {
- formattedQuery = this.formatWithSpaceAfter(
- token,
- formattedQuery,
- );
- } else if (token.value === '.') {
- formattedQuery = this.formatWithoutSpaces(
- token,
- formattedQuery,
- );
- } else if (token.value === ';') {
- formattedQuery = this.formatQuerySeparator(
- token,
- formattedQuery,
- );
- } else if (token.value === '$') {
- formattedQuery = formattedQuery + token.value;
- } else {
- formattedQuery = this.formatWithSpaces(token, formattedQuery);
- }
- });
- return formattedQuery;
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatLineComment(token, query) {
- return this.addNewline(query + token.value);
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatBlockComment(token, query) {
- return this.addNewline(
- this.addNewline(query) + this.indentComment(token.value),
- );
- }
-
- /**
- *
- * @param {*} comment
- * @return {*}
- */
- indentComment(comment) {
- return comment.replace(/\n/g, '\n' + this.indentation.getIndent());
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatToplevelReservedWord(token, query) {
- this.indentation.decreaseTopLevel();
-
- query = this.addNewline(query);
-
- this.indentation.increaseToplevel();
-
- query += this.equalizeWhitespace(token.value);
- return this.addNewline(query);
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatNewlineReservedWord(token, query) {
- return (
- this.addNewline(query) + this.equalizeWhitespace(token.value) + ' '
- );
- }
-
- /**
- * Replace any sequence of whitespace characters with single space
- * @param {*} string
- * @return {*}
- */
- equalizeWhitespace(string) {
- return string.replace(/\s+/g, ' ');
- }
-
- /**
- * Opening parentheses increase the block indent level and start a new line
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatOpeningParentheses(token, query) {
- // Take out the preceding space unless there was whitespace there in the original query
- // or another opening parens or line comment
- const preserveWhitespaceFor = [
- tokenTypes.WHITESPACE,
- tokenTypes.OPEN_PAREN,
- tokenTypes.LINE_COMMENT,
- ];
- if (!preserveWhitespaceFor.includes(this.previousToken().type)) {
- query = trimEnd(query);
- }
- query += token.value;
-
- this.inlineBlock.beginIfPossible(this.tokens, this.index);
-
- if (!this.inlineBlock.isActive()) {
- this.indentation.increaseBlockLevel();
- query = this.addNewline(query);
- }
- return query;
- }
-
- /**
- * Closing parentheses decrease the block indent level
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatClosingParentheses(token, query) {
- if (this.inlineBlock.isActive()) {
- this.inlineBlock.end();
- return this.formatWithSpaceAfter(token, query);
- } else {
- this.indentation.decreaseBlockLevel();
- return this.formatWithSpaces(token, this.addNewline(query));
- }
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatPlaceholder(token, query) {
- return query + this.params.get(token) + ' ';
- }
-
- /**
- * Commas start a new line (unless within inline parentheses or SQL "LIMIT" clause)
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatComma(token, query) {
- query = this.trimTrailingWhitespace(query) + token.value + ' ';
-
- if (this.inlineBlock.isActive()) {
- return query;
- } else if (/^LIMIT$/i.test(this.previousReservedWord.value)) {
- return query;
- } else {
- return this.addNewline(query);
- }
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatWithSpaceAfter(token, query) {
- return this.trimTrailingWhitespace(query) + token.value + ' ';
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatWithoutSpaces(token, query) {
- return this.trimTrailingWhitespace(query) + token.value;
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatWithSpaces(token, query) {
- return query + token.value + ' ';
- }
-
- /**
- *
- * @param {*} token
- * @param {*} query
- * @return {*}
- */
- formatQuerySeparator(token, query) {
- return this.trimTrailingWhitespace(query) + token.value + '\n';
- }
-
- /**
- *
- * @param {*} query
- * @return {*}
- */
- addNewline(query) {
- return trimEnd(query) + '\n' + this.indentation.getIndent();
- }
-
- /**
- *
- * @param {*} query
- * @return {*}
- */
- trimTrailingWhitespace(query) {
- if (
- this.previousNonWhitespaceToken().type === tokenTypes.LINE_COMMENT
- ) {
- return trimEnd(query) + '\n';
- } else {
- return trimEnd(query);
- }
- }
-
- /**
- *
- * @return {*}
- */
- previousNonWhitespaceToken() {
- let n = 1;
- while (this.previousToken(n).type === tokenTypes.WHITESPACE) {
- n++;
- }
- return this.previousToken(n);
- }
-
- /**
- *
- * @param {*} offset
- * @return {*}
- */
- previousToken(offset = 1) {
- return this.tokens[this.index - offset] || {};
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/core/Indentation.ts b/linkis-web-next/src/components/editor/sqlFormatter/core/Indentation.ts
deleted file mode 100644
index 974ad47fc9..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/core/Indentation.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-import repeat from 'lodash/repeat';
-import last from 'lodash/last';
-
-const INDENT_TYPE_TOP_LEVEL = 'top-level';
-const INDENT_TYPE_BLOCK_LEVEL = 'block-level';
-
-/**
- * Manages indentation levels.
- *
- * There are two types of indentation levels:
- *
- * - BLOCK_LEVEL : increased by open-parenthesis
- * - TOP_LEVEL : increased by RESERVED_TOPLEVEL words
- */
-export default class Indentation {
- /**
- * @param {String} indent Indent value, default is " " (2 spaces)
- */
- constructor(indent) {
- this.indent = indent || ' ';
- this.indentTypes = [];
- }
-
- /**
- * Returns current indentation string.
- * @return {String}
- */
- getIndent() {
- return repeat(this.indent, this.indentTypes.length);
- }
-
- /**
- * Increases indentation by one top-level indent.
- */
- increaseToplevel() {
- this.indentTypes.push(INDENT_TYPE_TOP_LEVEL);
- }
-
- /**
- * Increases indentation by one block-level indent.
- */
- increaseBlockLevel() {
- this.indentTypes.push(INDENT_TYPE_BLOCK_LEVEL);
- }
-
- /**
- * Decreases indentation by one top-level indent.
- * Does nothing when the previous indent is not top-level.
- */
- decreaseTopLevel() {
- if (last(this.indentTypes) === INDENT_TYPE_TOP_LEVEL) {
- this.indentTypes.pop();
- }
- }
-
- /**
- * Decreases indentation by one block-level indent.
- * If there are top-level indents within the block-level indent,
- * throws away these as well.
- */
- decreaseBlockLevel() {
- while (this.indentTypes.length > 0) {
- const type = this.indentTypes.pop();
- if (type !== INDENT_TYPE_TOP_LEVEL) {
- break;
- }
- }
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/core/InlineBlock.ts b/linkis-web-next/src/components/editor/sqlFormatter/core/InlineBlock.ts
deleted file mode 100644
index f3d6955024..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/core/InlineBlock.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import tokenTypes from './tokenTypes';
-
-const INLINE_MAX_LENGTH = 50;
-
-/**
- * Bookkeeper for inline blocks.
- *
- * Inline blocks are parenthized expressions that are shorter than INLINE_MAX_LENGTH.
- * These blocks are formatted on a single line, unlike longer parenthized
- * expressions where open-parenthesis causes newline and increase of indentation.
- */
-export default class InlineBlock {
- /**
- *
- */
- constructor() {
- this.level = 0;
- }
-
- /**
- * Begins inline block when lookahead through upcoming tokens determines
- * that the block would be smaller than INLINE_MAX_LENGTH.
- * @param {Object[]} tokens Array of all tokens
- * @param {Number} index Current token position
- */
- beginIfPossible(tokens, index) {
- if (this.level === 0 && this.isInlineBlock(tokens, index)) {
- this.level = 1;
- } else if (this.level > 0) {
- this.level++;
- } else {
- this.level = 0;
- }
- }
-
- /**
- * Finishes current inline block.
- * There might be several nested ones.
- */
- end() {
- this.level--;
- }
-
- /**
- * True when inside an inline block
- * @return {Boolean}
- */
- isActive() {
- return this.level > 0;
- }
-
- /**
- * Check if this should be an inline parentheses block
- * Examples are "NOW()", "COUNT(*)", "int(10)", key(`somecolumn`), DECIMAL(7,2)
- * @param {*} tokens
- * @param {*} index
- * @return {*}
- */
- isInlineBlock(tokens, index) {
- let length = 0;
- let level = 0;
-
- for (let i = index; i < tokens.length; i++) {
- const token = tokens[i];
- length += token.value.length;
-
- // Overran max length
- if (length > INLINE_MAX_LENGTH) {
- return false;
- }
-
- if (token.type === tokenTypes.OPEN_PAREN) {
- level++;
- } else if (token.type === tokenTypes.CLOSE_PAREN) {
- level--;
- if (level === 0) {
- return true;
- }
- }
-
- if (this.isForbiddenToken(token)) {
- return false;
- }
- }
- return false;
- }
-
- /**
- * Reserved words that cause newlines, comments and semicolons
- * are not allowed inside inline parentheses block
- * @param {*} param0
- * @return {*}
- */
- isForbiddenToken({ type, value }) {
- return (
- type === tokenTypes.RESERVED_TOPLEVEL ||
- type === tokenTypes.RESERVED_NEWLINE ||
- type === tokenTypes.COMMENT ||
- type === tokenTypes.BLOCK_COMMENT ||
- value === ';'
- );
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/core/Params.ts b/linkis-web-next/src/components/editor/sqlFormatter/core/Params.ts
deleted file mode 100644
index ca5b52ab7c..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/core/Params.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/**
- * Handles placeholder replacement with given params.
- */
-export default class Params {
- /**
- * @param {Object} params
- */
- constructor(params) {
- this.params = params;
- this.index = 0;
- }
-
- /**
- * Returns param value that matches given placeholder with param key.
- * @param {Object} token
- * @param {String} token.key Placeholder key
- * @param {String} token.value Placeholder value
- * @return {String} param or token.value when params are missing
- */
- get({ key, value }) {
- if (!this.params) {
- return value;
- }
- if (key) {
- return this.params[key];
- }
- return this.params[this.index++];
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/core/Tokenizer.ts b/linkis-web-next/src/components/editor/sqlFormatter/core/Tokenizer.ts
deleted file mode 100644
index 4658a2498d..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/core/Tokenizer.ts
+++ /dev/null
@@ -1,508 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-import isEmpty from 'lodash/isEmpty';
-import escapeRegExp from 'lodash/escapeRegExp';
-import tokenTypes from './tokenTypes';
-
-/**
- *
- */
-export default class Tokenizer {
- /**
- * @param {Object} cfg
- * @param {String[]} cfg.reservedWords Reserved words in SQL
- * @param {String[]} cfg.reservedToplevelWords Words that are set to new line separately
- * @param {String[]} cfg.reservedNewlineWords Words that are set to newline
- * @param {String[]} cfg.stringTypes String types to enable: "", '', ``, [], N''
- * @param {String[]} cfg.openParens Opening parentheses to enable, like (, [
- * @param {String[]} cfg.closeParens Closing parentheses to enable, like ), ]
- * @param {String[]} cfg.indexedPlaceholderTypes Prefixes for indexed placeholders, like ?
- * @param {String[]} cfg.namedPlaceholderTypes Prefixes for named placeholders, like @ and :
- * @param {String[]} cfg.lineCommentTypes Line comments to enable, like # and --
- * @param {String[]} cfg.specialWordChars Special chars that can be found inside of words, like @ and #
- */
- constructor(cfg) {
- this.WHITESPACE_REGEX = /^(\s+)/;
- this.NUMBER_REGEX = /^((-\s*)?[0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)\b/;
- this.OPERATOR_REGEX = /^(!=|<>|==|<=|>=|!<|!>|\|\||::|->>|->|~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|.)/;
-
- this.BLOCK_COMMENT_REGEX = /^(\/\*[^]*?(?:\*\/|$))/;
- this.PARAMS_REGEX = cfg.paramsPattern;
- this.LINE_COMMENT_REGEX = this.createLineCommentRegex(cfg.lineCommentTypes);
-
- this.RESERVED_TOPLEVEL_REGEX = this.createReservedWordRegex(cfg.reservedToplevelWords);
- this.RESERVED_NEWLINE_REGEX = this.createReservedWordRegex(cfg.reservedNewlineWords);
- this.RESERVED_PLAIN_REGEX = this.createReservedWordRegex(cfg.reservedWords);
-
- this.WORD_REGEX = this.createWordRegex(cfg.specialWordChars);
- this.STRING_REGEX = this.createStringRegex(cfg.stringTypes);
-
- this.OPEN_PAREN_REGEX = this.createParenRegex(cfg.openParens);
- this.CLOSE_PAREN_REGEX = this.createParenRegex(cfg.closeParens);
-
- this.INDEXED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(cfg.indexedPlaceholderTypes, '[0-9]*');
- this.IDENT_NAMED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(cfg.namedPlaceholderTypes, '[a-zA-Z0-9._$]+');
- this.STRING_NAMED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(
- cfg.namedPlaceholderTypes,
- this.createStringPattern(cfg.stringTypes)
- );
- }
-
- /**
- *
- * @param {*} lineCommentTypes
- * @return {*}
- */
- createLineCommentRegex(lineCommentTypes) {
- return new RegExp(`^((?:${lineCommentTypes.map((c) => escapeRegExp(c)).join('|')}).*?(?:\n|\r\n|$))`);
- }
-
- /**
- *
- * @param {*} reservedWords
- * @return {*}
- */
- createReservedWordRegex(reservedWords) {
- const reservedWordsPattern = reservedWords.join('|').replace(/ /g, '\\s+');
- return new RegExp(`^(${reservedWordsPattern})\\b`, 'i');
- }
-
- /**
- *
- * @param {*} specialChars
- * @return {*}
- */
- createWordRegex(specialChars = []) {
- return new RegExp(`^([\\w${specialChars.join('')}]+)`);
- }
-
- /**
- *
- * @param {*} stringTypes
- * @return {*}
- */
- createStringRegex(stringTypes) {
- return new RegExp(
- '^(' + this.createStringPattern(stringTypes) + ')'
- );
- }
-
- /**
- * This enables the following string patterns:
- * 1.backtick quoted string using `` to escape
- * 2.square bracket quoted string (SQL Server) using ]] to escape
- * 3.double quoted string using "" or \" to escape
- * 4.single quoted string using '' or \' to escape
- * 5.national character quoted string using N'' or N\' to escape
- * @param {*} stringTypes
- * @return {*}
- */
- createStringPattern(stringTypes) {
- const patterns = {
- '``': '((`[^`]*($|`))+)',
- '[]': '((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)',
- '""': '(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',
- '\'\'': '((\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*(\'|$))+)',
- 'N\'\'': '((N\'[^N\'\\\\]*(?:\\\\.[^N\'\\\\]*)*(\'|$))+)',
- };
-
- return stringTypes.map((t) => patterns[t]).join('|');
- }
-
- /**
- *
- * @param {*} parens
- * @return {*}
- */
- createParenRegex(parens) {
- return new RegExp(
- '^(' + parens.map((p) => this.escapeParen(p)).join('|') + ')',
- 'i'
- );
- }
-
- /**
- *
- * @param {*} paren
- * @return {*}
- */
- escapeParen(paren) {
- if (paren.length === 1) {
- // A single punctuation character
- return escapeRegExp(paren);
- } else {
- // longer word
- return '\\b' + paren + '\\b';
- }
- }
-
- /**
- *
- * @param {*} types
- * @param {*} pattern
- * @return {*}
- */
- createPlaceholderRegex(types, pattern) {
- if (isEmpty(types)) {
- return false;
- }
- const typesRegex = types.map(escapeRegExp).join('|');
-
- return new RegExp(`^((?:${typesRegex})(?:${pattern}))`);
- }
-
- /**
- * Takes a SQL string and breaks it into tokens.
- * Each token is an object with type and value.
- *
- * @param {String} input The SQL string
- * @return {Object[]} tokens An array of tokens.
- * @return {String} token.type
- * @return {String} token.value
- */
- tokenize(input) {
- const tokens = [];
- let token;
-
- // Keep processing the string until it is empty
- while (input.length) {
- // Get the next token and the token type
- token = this.getNextToken(input, token);
- // Advance the string
- input = input.substring(token.value.length);
-
- tokens.push(token);
- }
- return tokens;
- }
-
- /**
- *
- * @param {*} input
- * @param {*} previousToken
- * @return {*}
- */
- getNextToken(input, previousToken) {
- return this.getWhitespaceToken(input) ||
- this.getCommentToken(input) ||
- this.getStringToken(input) ||
- this.getOpenParenToken(input) ||
- this.getCloseParenToken(input) ||
- this.getParamsToken(input) ||
- this.getPlaceholderToken(input) ||
- this.getNumberToken(input) ||
- this.getReservedWordToken(input, previousToken) ||
- this.getWordToken(input) ||
- this.getOperatorToken(input);
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getWhitespaceToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.WHITESPACE,
- regex: this.WHITESPACE_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getCommentToken(input) {
- return this.getLineCommentToken(input) || this.getBlockCommentToken(input);
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getLineCommentToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.LINE_COMMENT,
- regex: this.LINE_COMMENT_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getBlockCommentToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.BLOCK_COMMENT,
- regex: this.BLOCK_COMMENT_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getStringToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.STRING,
- regex: this.STRING_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getOpenParenToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.OPEN_PAREN,
- regex: this.OPEN_PAREN_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getCloseParenToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.CLOSE_PAREN,
- regex: this.CLOSE_PAREN_REGEX,
- });
- }
-
- getParamsToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.WORD,
- regex: this.PARAMS_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getPlaceholderToken(input) {
- return this.getIdentNamedPlaceholderToken(input) ||
- this.getStringNamedPlaceholderToken(input) ||
- this.getIndexedPlaceholderToken(input);
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getIdentNamedPlaceholderToken(input) {
- return this.getPlaceholderTokenWithKey({
- input,
- regex: this.IDENT_NAMED_PLACEHOLDER_REGEX,
- parseKey: (v) => v.slice(1),
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getStringNamedPlaceholderToken(input) {
- return this.getPlaceholderTokenWithKey({
- input,
- regex: this.STRING_NAMED_PLACEHOLDER_REGEX,
- parseKey: (v) => this.getEscapedPlaceholderKey({
- key: v.slice(2, -1),
- quoteChar: v.slice(-1)
- }),
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getIndexedPlaceholderToken(input) {
- return this.getPlaceholderTokenWithKey({
- input,
- regex: this.INDEXED_PLACEHOLDER_REGEX,
- parseKey: (v) => v.slice(1),
- });
- }
-
- /**
- *
- * @param {*} param0
- * @return {*}
- */
- getPlaceholderTokenWithKey({
- input,
- regex,
- parseKey
- }) {
- const token = this.getTokenOnFirstMatch({
- input,
- regex,
- type: tokenTypes.PLACEHOLDER
- });
- if (token) {
- token.key = parseKey(token.value);
- }
- return token;
- }
-
- /**
- *
- * @param {*} param0
- * @return {*}
- */
- getEscapedPlaceholderKey({
- key,
- quoteChar
- }) {
- return key.replace(new RegExp(escapeRegExp('\\') + quoteChar, 'g'), quoteChar);
- }
-
- /**
- * Decimal, binary, or hex numbers
- * @param {*} input
- * @return {*}
- */
- getNumberToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.NUMBER,
- regex: this.NUMBER_REGEX,
- });
- }
-
- /**
- * Punctuation and symbols
- * @param {*} input
- * @return {*}
- */
- getOperatorToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.OPERATOR,
- regex: this.OPERATOR_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @param {*} previousToken
- * @return {*}
- */
- getReservedWordToken(input, previousToken) {
- // A reserved word cannot be preceded by a "."
- // this makes it so in "mytable.from", "from" is not considered a reserved word
- if (previousToken && previousToken.value && previousToken.value === '.') {
- return;
- }
- return this.getToplevelReservedToken(input) || this.getNewlineReservedToken(input) || this.getPlainReservedToken(input);
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getToplevelReservedToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.RESERVED_TOPLEVEL,
- regex: this.RESERVED_TOPLEVEL_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getNewlineReservedToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.RESERVED_NEWLINE,
- regex: this.RESERVED_NEWLINE_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getPlainReservedToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.RESERVED,
- regex: this.RESERVED_PLAIN_REGEX,
- });
- }
-
- /**
- *
- * @param {*} input
- * @return {*}
- */
- getWordToken(input) {
- return this.getTokenOnFirstMatch({
- input,
- type: tokenTypes.WORD,
- regex: this.WORD_REGEX,
- });
- }
-
- /**
- *
- * @param {*} param0
- * @return {*}
- */
- getTokenOnFirstMatch({
- input,
- type,
- regex
- }) {
- const matches = input.match(regex);
-
- if (matches) {
- return {
- type,
- value: matches[1]
- };
- }
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/core/tokenTypes.ts b/linkis-web-next/src/components/editor/sqlFormatter/core/tokenTypes.ts
deleted file mode 100644
index d4ce6c4b81..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/core/tokenTypes.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/**
- * Constants for token types
- */
-export default {
- WHITESPACE: 'whitespace',
- WORD: 'word',
- STRING: 'string',
- RESERVED: 'reserved',
- RESERVED_TOPLEVEL: 'reserved-toplevel',
- RESERVED_NEWLINE: 'reserved-newline',
- OPERATOR: 'operator',
- OPEN_PAREN: 'open-paren',
- CLOSE_PAREN: 'close-paren',
- LINE_COMMENT: 'line-comment',
- BLOCK_COMMENT: 'block-comment',
- NUMBER: 'number',
- PLACEHOLDER: 'placeholder',
-};
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/languages/Db2Formatter.ts b/linkis-web-next/src/components/editor/sqlFormatter/languages/Db2Formatter.ts
deleted file mode 100644
index 199647b905..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/languages/Db2Formatter.ts
+++ /dev/null
@@ -1,601 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Formatter from '../core/Formatter';
-import Tokenizer from '../core/Tokenizer';
-
-const reservedWords = [
- 'ABS',
- 'ACTIVATE',
- 'ALIAS',
- 'ALL',
- 'ALLOCATE',
- 'ALLOW',
- 'ALTER',
- 'ANY',
- 'ARE',
- 'ARRAY',
- 'AS',
- 'ASC',
- 'ASENSITIVE',
- 'ASSOCIATE',
- 'ASUTIME',
- 'ASYMMETRIC',
- 'AT',
- 'ATOMIC',
- 'ATTRIBUTES',
- 'AUDIT',
- 'AUTHORIZATION',
- 'AUX',
- 'AUXILIARY',
- 'AVG',
- 'BEFORE',
- 'BEGIN',
- 'BETWEEN',
- 'BIGINT',
- 'BINARY',
- 'BLOB',
- 'BOOLEAN',
- 'BOTH',
- 'BUFFERPOOL',
- 'BY',
- 'CACHE',
- 'CALL',
- 'CALLED',
- 'CAPTURE',
- 'CARDINALITY',
- 'CASCADED',
- 'CASE',
- 'CAST',
- 'CCSID',
- 'CEIL',
- 'CEILING',
- 'CHAR',
- 'CHARACTER',
- 'CHARACTER_LENGTH',
- 'CHAR_LENGTH',
- 'CHECK',
- 'CLOB',
- 'CLONE',
- 'CLOSE',
- 'CLUSTER',
- 'COALESCE',
- 'COLLATE',
- 'COLLECT',
- 'COLLECTION',
- 'COLLID',
- 'COLUMN',
- 'COMMENT',
- 'COMMIT',
- 'CONCAT',
- 'CONDITION',
- 'CONNECT',
- 'CONNECTION',
- 'CONSTRAINT',
- 'CONTAINS',
- 'CONTINUE',
- 'CONVERT',
- 'CORR',
- 'CORRESPONDING',
- 'COUNT',
- 'COUNT_BIG',
- 'COVAR_POP',
- 'COVAR_SAMP',
- 'CREATE',
- 'CROSS',
- 'CUBE',
- 'CUME_DIST',
- 'CURRENT',
- 'CURRENT_DATE',
- 'CURRENT_DEFAULT_TRANSFORM_GROUP',
- 'CURRENT_LC_CTYPE',
- 'CURRENT_PATH',
- 'CURRENT_ROLE',
- 'CURRENT_SCHEMA',
- 'CURRENT_SERVER',
- 'CURRENT_TIME',
- 'CURRENT_TIMESTAMP',
- 'CURRENT_TIMEZONE',
- 'CURRENT_TRANSFORM_GROUP_FOR_TYPE',
- 'CURRENT_USER',
- 'CURSOR',
- 'CYCLE',
- 'DATA',
- 'DATABASE',
- 'DATAPARTITIONNAME',
- 'DATAPARTITIONNUM',
- 'DATE',
- 'DAY',
- 'DAYS',
- 'DB2GENERAL',
- 'DB2GENRL',
- 'DB2SQL',
- 'DBINFO',
- 'DBPARTITIONNAME',
- 'DBPARTITIONNUM',
- 'DEALLOCATE',
- 'DEC',
- 'DECIMAL',
- 'DECLARE',
- 'DEFAULT',
- 'DEFAULTS',
- 'DEFINITION',
- 'DELETE',
- 'DENSERANK',
- 'DENSE_RANK',
- 'DEREF',
- 'DESCRIBE',
- 'DESCRIPTOR',
- 'DETERMINISTIC',
- 'DIAGNOSTICS',
- 'DISABLE',
- 'DISALLOW',
- 'DISCONNECT',
- 'DISTINCT',
- 'DO',
- 'DOCUMENT',
- 'DOUBLE',
- 'DROP',
- 'DSSIZE',
- 'DYNAMIC',
- 'EACH',
- 'EDITPROC',
- 'ELEMENT',
- 'ELSE',
- 'ELSEIF',
- 'ENABLE',
- 'ENCODING',
- 'ENCRYPTION',
- 'END',
- 'END-EXEC',
- 'ENDING',
- 'ERASE',
- 'ESCAPE',
- 'EVERY',
- 'EXCEPTION',
- 'EXCLUDING',
- 'EXCLUSIVE',
- 'EXEC',
- 'EXECUTE',
- 'EXISTS',
- 'EXIT',
- 'EXP',
- 'EXPLAIN',
- 'EXTENDED',
- 'EXTERNAL',
- 'EXTRACT',
- 'FALSE',
- 'FENCED',
- 'FETCH',
- 'FIELDPROC',
- 'FILE',
- 'FILTER',
- 'FINAL',
- 'FIRST',
- 'FLOAT',
- 'FLOOR',
- 'FOR',
- 'FOREIGN',
- 'FREE',
- 'FULL',
- 'FUNCTION',
- 'FUSION',
- 'GENERAL',
- 'GENERATED',
- 'GET',
- 'GLOBAL',
- 'GOTO',
- 'GRANT',
- 'GRAPHIC',
- 'GROUP',
- 'GROUPING',
- 'HANDLER',
- 'HASH',
- 'HASHED_VALUE',
- 'HINT',
- 'HOLD',
- 'HOUR',
- 'HOURS',
- 'IDENTITY',
- 'IF',
- 'IMMEDIATE',
- 'IN',
- 'INCLUDING',
- 'INCLUSIVE',
- 'INCREMENT',
- 'INDEX',
- 'INDICATOR',
- 'INDICATORS',
- 'INF',
- 'INFINITY',
- 'INHERIT',
- 'INNER',
- 'INOUT',
- 'INSENSITIVE',
- 'INSERT',
- 'INT',
- 'INTEGER',
- 'INTEGRITY',
- 'INTERSECTION',
- 'INTERVAL',
- 'INTO',
- 'IS',
- 'ISOBID',
- 'ISOLATION',
- 'ITERATE',
- 'JAR',
- 'JAVA',
- 'KEEP',
- 'KEY',
- 'LABEL',
- 'LANGUAGE',
- 'LARGE',
- 'LATERAL',
- 'LC_CTYPE',
- 'LEADING',
- 'LEAVE',
- 'LEFT',
- 'LIKE',
- 'LINKTYPE',
- 'LN',
- 'LOCAL',
- 'LOCALDATE',
- 'LOCALE',
- 'LOCALTIME',
- 'LOCALTIMESTAMP',
- 'LOCATOR',
- 'LOCATORS',
- 'LOCK',
- 'LOCKMAX',
- 'LOCKSIZE',
- 'LONG',
- 'LOOP',
- 'LOWER',
- 'MAINTAINED',
- 'MATCH',
- 'MATERIALIZED',
- 'MAX',
- 'MAXVALUE',
- 'MEMBER',
- 'MERGE',
- 'METHOD',
- 'MICROSECOND',
- 'MICROSECONDS',
- 'MIN',
- 'MINUTE',
- 'MINUTES',
- 'MINVALUE',
- 'MOD',
- 'MODE',
- 'MODIFIES',
- 'MODULE',
- 'MONTH',
- 'MONTHS',
- 'MULTISET',
- 'NAN',
- 'NATIONAL',
- 'NATURAL',
- 'NCHAR',
- 'NCLOB',
- 'NEW',
- 'NEW_TABLE',
- 'NEXTVAL',
- 'NO',
- 'NOCACHE',
- 'NOCYCLE',
- 'NODENAME',
- 'NODENUMBER',
- 'NOMAXVALUE',
- 'NOMINVALUE',
- 'NONE',
- 'NOORDER',
- 'NORMALIZE',
- 'NORMALIZED',
- 'NOT',
- 'NULL',
- 'NULLIF',
- 'NULLS',
- 'NUMERIC',
- 'NUMPARTS',
- 'OBID',
- 'OCTET_LENGTH',
- 'OF',
- 'OFFSET',
- 'OLD',
- 'OLD_TABLE',
- 'ON',
- 'ONLY',
- 'OPEN',
- 'OPTIMIZATION',
- 'OPTIMIZE',
- 'OPTION',
- 'ORDER',
- 'OUT',
- 'OUTER',
- 'OVER',
- 'OVERLAPS',
- 'OVERLAY',
- 'OVERRIDING',
- 'PACKAGE',
- 'PADDED',
- 'PAGESIZE',
- 'PARAMETER',
- 'PART',
- 'PARTITION',
- 'PARTITIONED',
- 'PARTITIONING',
- 'PARTITIONS',
- 'PASSWORD',
- 'PATH',
- 'PERCENTILE_CONT',
- 'PERCENTILE_DISC',
- 'PERCENT_RANK',
- 'PIECESIZE',
- 'PLAN',
- 'POSITION',
- 'POWER',
- 'PRECISION',
- 'PREPARE',
- 'PREVVAL',
- 'PRIMARY',
- 'PRIQTY',
- 'PRIVILEGES',
- 'PROCEDURE',
- 'PROGRAM',
- 'PSID',
- 'PUBLIC',
- 'QUERY',
- 'QUERYNO',
- 'RANGE',
- 'RANK',
- 'READ',
- 'READS',
- 'REAL',
- 'RECOVERY',
- 'RECURSIVE',
- 'REF',
- 'REFERENCES',
- 'REFERENCING',
- 'REFRESH',
- 'REGR_AVGX',
- 'REGR_AVGY',
- 'REGR_COUNT',
- 'REGR_INTERCEPT',
- 'REGR_R2',
- 'REGR_SLOPE',
- 'REGR_SXX',
- 'REGR_SXY',
- 'REGR_SYY',
- 'RELEASE',
- 'RENAME',
- 'REPEAT',
- 'RESET',
- 'RESIGNAL',
- 'RESTART',
- 'RESTRICT',
- 'RESULT',
- 'RESULT_SET_LOCATOR',
- 'RETURN',
- 'RETURNS',
- 'REVOKE',
- 'RIGHT',
- 'ROLE',
- 'ROLLBACK',
- 'ROLLUP',
- 'ROUND_CEILING',
- 'ROUND_DOWN',
- 'ROUND_FLOOR',
- 'ROUND_HALF_DOWN',
- 'ROUND_HALF_EVEN',
- 'ROUND_HALF_UP',
- 'ROUND_UP',
- 'ROUTINE',
- 'ROW',
- 'ROWNUMBER',
- 'ROWS',
- 'ROWSET',
- 'ROW_NUMBER',
- 'RRN',
- 'RUN',
- 'SAVEPOINT',
- 'SCHEMA',
- 'SCOPE',
- 'SCRATCHPAD',
- 'SCROLL',
- 'SEARCH',
- 'SECOND',
- 'SECONDS',
- 'SECQTY',
- 'SECURITY',
- 'SENSITIVE',
- 'SEQUENCE',
- 'SESSION',
- 'SESSION_USER',
- 'SIGNAL',
- 'SIMILAR',
- 'SIMPLE',
- 'SMALLINT',
- 'SNAN',
- 'SOME',
- 'SOURCE',
- 'SPECIFIC',
- 'SPECIFICTYPE',
- 'SQL',
- 'SQLEXCEPTION',
- 'SQLID',
- 'SQLSTATE',
- 'SQLWARNING',
- 'SQRT',
- 'STACKED',
- 'STANDARD',
- 'START',
- 'STARTING',
- 'STATEMENT',
- 'STATIC',
- 'STATMENT',
- 'STAY',
- 'STDDEV_POP',
- 'STDDEV_SAMP',
- 'STOGROUP',
- 'STORES',
- 'STYLE',
- 'SUBMULTISET',
- 'SUBSTRING',
- 'SUM',
- 'SUMMARY',
- 'SYMMETRIC',
- 'SYNONYM',
- 'SYSFUN',
- 'SYSIBM',
- 'SYSPROC',
- 'SYSTEM',
- 'SYSTEM_USER',
- 'TABLE',
- 'TABLESAMPLE',
- 'TABLESPACE',
- 'THEN',
- 'TIME',
- 'TIMESTAMP',
- 'TIMEZONE_HOUR',
- 'TIMEZONE_MINUTE',
- 'TO',
- 'TRAILING',
- 'TRANSACTION',
- 'TRANSLATE',
- 'TRANSLATION',
- 'TREAT',
- 'TRIGGER',
- 'TRIM',
- 'TRUE',
- 'TRUNCATE',
- 'TYPE',
- 'UESCAPE',
- 'UNDO',
- 'UNIQUE',
- 'UNKNOWN',
- 'UNNEST',
- 'UNTIL',
- 'UPPER',
- 'USAGE',
- 'USER',
- 'USING',
- 'VALIDPROC',
- 'VALUE',
- 'VARCHAR',
- 'VARIABLE',
- 'VARIANT',
- 'VARYING',
- 'VAR_POP',
- 'VAR_SAMP',
- 'VCAT',
- 'VERSION',
- 'VIEW',
- 'VOLATILE',
- 'VOLUMES',
- 'WHEN',
- 'WHENEVER',
- 'WHILE',
- 'WIDTH_BUCKET',
- 'WINDOW',
- 'WITH',
- 'WITHIN',
- 'WITHOUT',
- 'WLM',
- 'WRITE',
- 'XMLELEMENT',
- 'XMLEXISTS',
- 'XMLNAMESPACES',
- 'YEAR',
- 'YEARS',
-];
-
-const reservedToplevelWords = [
- 'ADD',
- 'AFTER',
- 'ALTER COLUMN',
- 'ALTER TABLE',
- 'DELETE FROM',
- 'EXCEPT',
- 'FETCH FIRST',
- 'FROM',
- 'GROUP BY',
- 'GO',
- 'HAVING',
- 'INSERT INTO',
- 'INTERSECT',
- 'LIMIT',
- 'ORDER BY',
- 'SELECT',
- 'SET CURRENT SCHEMA',
- 'SET SCHEMA',
- 'SET',
- 'UNION ALL',
- 'UPDATE',
- 'VALUES',
- 'WHERE',
-];
-
-const reservedNewlineWords = [
- 'AND',
- 'CROSS JOIN',
- 'INNER JOIN',
- 'JOIN',
- 'LEFT JOIN',
- 'LEFT OUTER JOIN',
- 'OR',
- 'OUTER JOIN',
- 'RIGHT JOIN',
- 'RIGHT OUTER JOIN',
-];
-
-let tokenizer: Tokenizer;
-
-/**
- *
- */
-export default class Db2Formatter {
- /**
- * @param {Object} cfg Different set of configurations
- */
- constructor(cfg: any) {
- this.cfg = cfg;
- }
-
- /**
- * Formats DB2 query to make it easier to read
- *
- * @param {String} query The DB2 query string
- * @return {String} formatted string
- */
- format(query: any) {
- if (!tokenizer) {
- tokenizer = new Tokenizer({
- reservedWords,
- reservedToplevelWords,
- reservedNewlineWords,
- stringTypes: [`""`, "''", '``', '[]'],
- openParens: ['('],
- closeParens: [')'],
- indexedPlaceholderTypes: ['?'],
- namedPlaceholderTypes: [':'],
- lineCommentTypes: ['--'],
- specialWordChars: ['#', '@'],
- });
- }
- return new Formatter(this.cfg, tokenizer).format(query);
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/languages/N1qlFormatter.ts b/linkis-web-next/src/components/editor/sqlFormatter/languages/N1qlFormatter.ts
deleted file mode 100644
index 4b926779b8..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/languages/N1qlFormatter.ts
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Formatter from '../core/Formatter';
-import Tokenizer from '../core/Tokenizer';
-
-const reservedWords = [
- 'ALL',
- 'ALTER',
- 'ANALYZE',
- 'AND',
- 'ANY',
- 'ARRAY',
- 'AS',
- 'ASC',
- 'BEGIN',
- 'BETWEEN',
- 'BINARY',
- 'BOOLEAN',
- 'BREAK',
- 'BUCKET',
- 'BUILD',
- 'BY',
- 'CALL',
- 'CASE',
- 'CAST',
- 'CLUSTER',
- 'COLLATE',
- 'COLLECTION',
- 'COMMIT',
- 'CONNECT',
- 'CONTINUE',
- 'CORRELATE',
- 'COVER',
- 'CREATE',
- 'DATABASE',
- 'DATASET',
- 'DATASTORE',
- 'DECLARE',
- 'DECREMENT',
- 'DELETE',
- 'DERIVED',
- 'DESC',
- 'DESCRIBE',
- 'DISTINCT',
- 'DO',
- 'DROP',
- 'EACH',
- 'ELEMENT',
- 'ELSE',
- 'END',
- 'EVERY',
- 'EXCEPT',
- 'EXCLUDE',
- 'EXECUTE',
- 'EXISTS',
- 'EXPLAIN',
- 'FALSE',
- 'FETCH',
- 'FIRST',
- 'FLATTEN',
- 'FOR',
- 'FORCE',
- 'FROM',
- 'FUNCTION',
- 'GRANT',
- 'GROUP',
- 'GSI',
- 'HAVING',
- 'IF',
- 'IGNORE',
- 'ILIKE',
- 'IN',
- 'INCLUDE',
- 'INCREMENT',
- 'INDEX',
- 'INFER',
- 'INLINE',
- 'INNER',
- 'INSERT',
- 'INTERSECT',
- 'INTO',
- 'IS',
- 'JOIN',
- 'KEY',
- 'KEYS',
- 'KEYSPACE',
- 'KNOWN',
- 'LAST',
- 'LEFT',
- 'LET',
- 'LETTING',
- 'LIKE',
- 'LIMIT',
- 'LSM',
- 'MAP',
- 'MAPPING',
- 'MATCHED',
- 'MATERIALIZED',
- 'MERGE',
- 'MINUS',
- 'MISSING',
- 'NAMESPACE',
- 'NEST',
- 'NOT',
- 'NULL',
- 'NUMBER',
- 'OBJECT',
- 'OFFSET',
- 'ON',
- 'OPTION',
- 'OR',
- 'ORDER',
- 'OUTER',
- 'OVER',
- 'PARSE',
- 'PARTITION',
- 'PASSWORD',
- 'PATH',
- 'POOL',
- 'PREPARE',
- 'PRIMARY',
- 'PRIVATE',
- 'PRIVILEGE',
- 'PROCEDURE',
- 'PUBLIC',
- 'RAW',
- 'REALM',
- 'REDUCE',
- 'RENAME',
- 'RETURN',
- 'RETURNING',
- 'REVOKE',
- 'RIGHT',
- 'ROLE',
- 'ROLLBACK',
- 'SATISFIES',
- 'SCHEMA',
- 'SELECT',
- 'SELF',
- 'SEMI',
- 'SET',
- 'SHOW',
- 'SOME',
- 'START',
- 'STATISTICS',
- 'STRING',
- 'SYSTEM',
- 'THEN',
- 'TO',
- 'TRANSACTION',
- 'TRIGGER',
- 'TRUE',
- 'TRUNCATE',
- 'UNDER',
- 'UNION',
- 'UNIQUE',
- 'UNKNOWN',
- 'UNNEST',
- 'UNSET',
- 'UPDATE',
- 'UPSERT',
- 'USE',
- 'USER',
- 'USING',
- 'VALIDATE',
- 'VALUE',
- 'VALUED',
- 'VALUES',
- 'VIA',
- 'VIEW',
- 'WHEN',
- 'WHERE',
- 'WHILE',
- 'WITH',
- 'WITHIN',
- 'WORK',
- 'XOR',
-];
-
-const reservedToplevelWords = [
- 'DELETE FROM',
- 'EXCEPT ALL',
- 'EXCEPT',
- 'EXPLAIN DELETE FROM',
- 'EXPLAIN UPDATE',
- 'EXPLAIN UPSERT',
- 'FROM',
- 'GROUP BY',
- 'HAVING',
- 'INFER',
- 'INSERT INTO',
- 'INTERSECT ALL',
- 'INTERSECT',
- 'LET',
- 'LIMIT',
- 'MERGE',
- 'NEST',
- 'ORDER BY',
- 'PREPARE',
- 'SELECT',
- 'SET CURRENT SCHEMA',
- 'SET SCHEMA',
- 'SET',
- 'UNION ALL',
- 'UNION',
- 'UNNEST',
- 'UPDATE',
- 'UPSERT',
- 'USE KEYS',
- 'VALUES',
- 'WHERE',
-];
-
-const reservedNewlineWords = [
- 'AND',
- 'INNER JOIN',
- 'JOIN',
- 'LEFT JOIN',
- 'LEFT OUTER JOIN',
- 'OR',
- 'OUTER JOIN',
- 'RIGHT JOIN',
- 'RIGHT OUTER JOIN',
- 'XOR',
-];
-
-let tokenizer;
-
-/**
- *
- */
-export default class N1qlFormatter {
- /**
- * @param {Object} cfg Different set of configurations
- */
- constructor(cfg) {
- this.cfg = cfg;
- }
-
- /**
- * Format the whitespace in a N1QL string to make it easier to read
- *
- * @param {String} query The N1QL string
- * @return {String} formatted string
- */
- format(query) {
- if (!tokenizer) {
- tokenizer = new Tokenizer({
- reservedWords,
- reservedToplevelWords,
- reservedNewlineWords,
- stringTypes: [`""`, "''", '``'],
- openParens: ['(', '[', '{'],
- closeParens: [')', ']', '}'],
- namedPlaceholderTypes: ['$'],
- lineCommentTypes: ['#', '--'],
- });
- }
- return new Formatter(this.cfg, tokenizer).format(query);
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/languages/PlSqlFormatter.ts b/linkis-web-next/src/components/editor/sqlFormatter/languages/PlSqlFormatter.ts
deleted file mode 100644
index 5f44d6c698..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/languages/PlSqlFormatter.ts
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Formatter from '../core/Formatter';
-import Tokenizer from '../core/Tokenizer';
-
-const reservedWords = [
- 'A',
- 'ACCESSIBLE',
- 'AGENT',
- 'AGGREGATE',
- 'ALL',
- 'ALTER',
- 'ANY',
- 'ARRAY',
- 'AS',
- 'ASC',
- 'AT',
- 'ATTRIBUTE',
- 'AUTHID',
- 'AVG',
- 'BETWEEN',
- 'BFILE_BASE',
- 'BINARY_INTEGER',
- 'BINARY',
- 'BLOB_BASE',
- 'BLOCK',
- 'BODY',
- 'BOOLEAN',
- 'BOTH',
- 'BOUND',
- 'BULK',
- 'BY',
- 'BYTE',
- 'C',
- 'CALL',
- 'CALLING',
- 'CASCADE',
- 'CASE',
- 'CHAR_BASE',
- 'CHAR',
- 'CHARACTER',
- 'CHARSET',
- 'CHARSETFORM',
- 'CHARSETID',
- 'CHECK',
- 'CLOB_BASE',
- 'CLONE',
- 'CLOSE',
- 'CLUSTER',
- 'CLUSTERS',
- 'COALESCE',
- 'COLAUTH',
- 'COLLECT',
- 'COLUMNS',
- 'COMMENT',
- 'COMMIT',
- 'COMMITTED',
- 'COMPILED',
- 'COMPRESS',
- 'CONNECT',
- 'CONSTANT',
- 'CONSTRUCTOR',
- 'CONTEXT',
- 'CONTINUE',
- 'CONVERT',
- 'COUNT',
- 'CRASH',
- 'CREATE',
- 'CREDENTIAL',
- 'CURRENT',
- 'CURRVAL',
- 'CURSOR',
- 'CUSTOMDATUM',
- 'DANGLING',
- 'DATA',
- 'DATE_BASE',
- 'DATE',
- 'DAY',
- 'DECIMAL',
- 'DEFAULT',
- 'DEFINE',
- 'DELETE',
- 'DESC',
- 'DETERMINISTIC',
- 'DIRECTORY',
- 'DISTINCT',
- 'DO',
- 'DOUBLE',
- 'DROP',
- 'DURATION',
- 'ELEMENT',
- 'ELSIF',
- 'EMPTY',
- 'ESCAPE',
- 'EXCEPTIONS',
- 'EXCLUSIVE',
- 'EXECUTE',
- 'EXISTS',
- 'EXIT',
- 'EXTENDS',
- 'EXTERNAL',
- 'EXTRACT',
- 'FALSE',
- 'FETCH',
- 'FINAL',
- 'FIRST',
- 'FIXED',
- 'FLOAT',
- 'FOR',
- 'FORALL',
- 'FORCE',
- 'FROM',
- 'FUNCTION',
- 'GENERAL',
- 'GOTO',
- 'GRANT',
- 'GROUP',
- 'HASH',
- 'HEAP',
- 'HIDDEN',
- 'HOUR',
- 'IDENTIFIED',
- 'IF',
- 'IMMEDIATE',
- 'IN',
- 'INCLUDING',
- 'INDEX',
- 'INDEXES',
- 'INDICATOR',
- 'INDICES',
- 'INFINITE',
- 'INSTANTIABLE',
- 'INT',
- 'INTEGER',
- 'INTERFACE',
- 'INTERVAL',
- 'INTO',
- 'INVALIDATE',
- 'IS',
- 'ISOLATION',
- 'JAVA',
- 'LANGUAGE',
- 'LARGE',
- 'LEADING',
- 'LENGTH',
- 'LEVEL',
- 'LIBRARY',
- 'LIKE',
- 'LIKE2',
- 'LIKE4',
- 'LIKEC',
- 'LIMITED',
- 'LOCAL',
- 'LOCK',
- 'LONG',
- 'MAP',
- 'MAX',
- 'MAXLEN',
- 'MEMBER',
- 'MERGE',
- 'MIN',
- 'MINUS',
- 'MINUTE',
- 'MLSLABEL',
- 'MOD',
- 'MODE',
- 'MONTH',
- 'MULTISET',
- 'NAME',
- 'NAN',
- 'NATIONAL',
- 'NATIVE',
- 'NATURAL',
- 'NATURALN',
- 'NCHAR',
- 'NEW',
- 'NEXTVAL',
- 'NOCOMPRESS',
- 'NOCOPY',
- 'NOT',
- 'NOWAIT',
- 'NULL',
- 'NULLIF',
- 'NUMBER_BASE',
- 'NUMBER',
- 'OBJECT',
- 'OCICOLL',
- 'OCIDATE',
- 'OCIDATETIME',
- 'OCIDURATION',
- 'OCIINTERVAL',
- 'OCILOBLOCATOR',
- 'OCINUMBER',
- 'OCIRAW',
- 'OCIREF',
- 'OCIREFCURSOR',
- 'OCIROWID',
- 'OCISTRING',
- 'OCITYPE',
- 'OF',
- 'OLD',
- 'ON',
- 'ONLY',
- 'OPAQUE',
- 'OPEN',
- 'OPERATOR',
- 'OPTION',
- 'ORACLE',
- 'ORADATA',
- 'ORDER',
- 'ORGANIZATION',
- 'ORLANY',
- 'ORLVARY',
- 'OTHERS',
- 'OUT',
- 'OVERLAPS',
- 'OVERRIDING',
- 'PACKAGE',
- 'PARALLEL_ENABLE',
- 'PARAMETER',
- 'PARAMETERS',
- 'PARENT',
- 'PARTITION',
- 'PASCAL',
- 'PCTFREE',
- 'PIPE',
- 'PIPELINED',
- 'PLS_INTEGER',
- 'PLUGGABLE',
- 'POSITIVE',
- 'POSITIVEN',
- 'PRAGMA',
- 'PRECISION',
- 'PRIOR',
- 'PRIVATE',
- 'PROCEDURE',
- 'PUBLIC',
- 'RAISE',
- 'RANGE',
- 'RAW',
- 'READ',
- 'REAL',
- 'RECORD',
- 'REF',
- 'REFERENCE',
- 'RELEASE',
- 'RELIES_ON',
- 'REM',
- 'REMAINDER',
- 'RENAME',
- 'RESOURCE',
- 'RESULT_CACHE',
- 'RESULT',
- 'RETURN',
- 'RETURNING',
- 'REVERSE',
- 'REVOKE',
- 'ROLLBACK',
- 'ROW',
- 'ROWID',
- 'ROWNUM',
- 'ROWTYPE',
- 'SAMPLE',
- 'SAVE',
- 'SAVEPOINT',
- 'SB1',
- 'SB2',
- 'SB4',
- 'SECOND',
- 'SEGMENT',
- 'SELF',
- 'SEPARATE',
- 'SEQUENCE',
- 'SERIALIZABLE',
- 'SHARE',
- 'SHORT',
- 'SIZE_T',
- 'SIZE',
- 'SMALLINT',
- 'SOME',
- 'SPACE',
- 'SPARSE',
- 'SQL',
- 'SQLCODE',
- 'SQLDATA',
- 'SQLERRM',
- 'SQLNAME',
- 'SQLSTATE',
- 'STANDARD',
- 'START',
- 'STATIC',
- 'STDDEV',
- 'STORED',
- 'STRING',
- 'STRUCT',
- 'STYLE',
- 'SUBMULTISET',
- 'SUBPARTITION',
- 'SUBSTITUTABLE',
- 'SUBTYPE',
- 'SUCCESSFUL',
- 'SUM',
- 'SYNONYM',
- 'SYSDATE',
- 'TABAUTH',
- 'TABLE',
- 'TDO',
- 'THE',
- 'THEN',
- 'TIME',
- 'TIMESTAMP',
- 'TIMEZONE_ABBR',
- 'TIMEZONE_HOUR',
- 'TIMEZONE_MINUTE',
- 'TIMEZONE_REGION',
- 'TO',
- 'TRAILING',
- 'TRANSACTION',
- 'TRANSACTIONAL',
- 'TRIGGER',
- 'TRUE',
- 'TRUSTED',
- 'TYPE',
- 'UB1',
- 'UB2',
- 'UB4',
- 'UID',
- 'UNDER',
- 'UNIQUE',
- 'UNPLUG',
- 'UNSIGNED',
- 'UNTRUSTED',
- 'USE',
- 'USER',
- 'USING',
- 'VALIDATE',
- 'VALIST',
- 'VALUE',
- 'VARCHAR',
- 'VARCHAR2',
- 'VARIABLE',
- 'VARIANCE',
- 'VARRAY',
- 'VARYING',
- 'VIEW',
- 'VIEWS',
- 'VOID',
- 'WHENEVER',
- 'WHILE',
- 'WITH',
- 'WORK',
- 'WRAPPED',
- 'WRITE',
- 'YEAR',
- 'ZONE',
-];
-
-const reservedToplevelWords = [
- 'ADD',
- 'ALTER COLUMN',
- 'ALTER TABLE',
- 'BEGIN',
- 'CONNECT BY',
- 'DECLARE',
- 'DELETE FROM',
- 'DELETE',
- 'END',
- 'EXCEPT',
- 'EXCEPTION',
- 'FETCH FIRST',
- 'FROM',
- 'GROUP BY',
- 'HAVING',
- 'INSERT INTO',
- 'INSERT',
- 'INTERSECT',
- 'LIMIT',
- 'LOOP',
- 'MODIFY',
- 'ORDER BY',
- 'SELECT',
- 'SET CURRENT SCHEMA',
- 'SET SCHEMA',
- 'SET',
- 'START WITH',
- 'UNION ALL',
- 'UNION',
- 'UPDATE',
- 'VALUES',
- 'WHERE',
-];
-
-const reservedNewlineWords = [
- 'AND',
- 'CROSS APPLY',
- 'CROSS JOIN',
- 'ELSE',
- 'END',
- 'INNER JOIN',
- 'JOIN',
- 'LEFT JOIN',
- 'LEFT OUTER JOIN',
- 'OR',
- 'OUTER APPLY',
- 'OUTER JOIN',
- 'RIGHT JOIN',
- 'RIGHT OUTER JOIN',
- 'WHEN',
- 'XOR',
-];
-
-let tokenizer;
-
-/**
- *
- */
-export default class PlSqlFormatter {
- /**
- * @param {Object} cfg Different set of configurations
- */
- constructor(cfg) {
- this.cfg = cfg;
- }
-
- /**
- * Format the whitespace in a PL/SQL string to make it easier to read
- *
- * @param {String} query The PL/SQL string
- * @return {String} formatted string
- */
- format(query) {
- if (!tokenizer) {
- tokenizer = new Tokenizer({
- reservedWords,
- reservedToplevelWords,
- reservedNewlineWords,
- stringTypes: [`""`, "N''", "''", '``'],
- openParens: ['(', 'CASE'],
- closeParens: [')', 'END'],
- indexedPlaceholderTypes: ['?'],
- namedPlaceholderTypes: [':'],
- lineCommentTypes: ['--'],
- specialWordChars: ['_', '$', '#', '.', '@'],
- });
- }
- return new Formatter(this.cfg, tokenizer).format(query);
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/languages/StandardSqlFormatter.ts b/linkis-web-next/src/components/editor/sqlFormatter/languages/StandardSqlFormatter.ts
deleted file mode 100644
index 2c8629da43..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/languages/StandardSqlFormatter.ts
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Formatter from '../core/Formatter';
-import Tokenizer from '../core/Tokenizer';
-
-const reservedWords = [
- 'ACCESSIBLE',
- 'ACTION',
- 'AGAINST',
- 'AGGREGATE',
- 'ALGORITHM',
- 'ALL',
- 'ALTER',
- 'ANALYSE',
- 'ANALYZE',
- 'AS',
- 'ASC',
- 'AUTOCOMMIT',
- 'AUTO_INCREMENT',
- 'BACKUP',
- 'BEGIN',
- 'BETWEEN',
- 'BINLOG',
- 'BOTH',
- 'CASCADE',
- 'CASE',
- 'CHANGE',
- 'CHANGED',
- 'CHARACTER SET',
- 'CHARSET',
- 'CHECK',
- 'CHECKSUM',
- 'COLLATE',
- 'COLLATION',
- 'COLUMN',
- 'COLUMNS',
- 'COMMENT',
- 'COMMIT',
- 'COMMITTED',
- 'COMPRESSED',
- 'CONCURRENT',
- 'CONSTRAINT',
- 'CONTAINS',
- 'CONVERT',
- 'CREATE',
- 'CROSS',
- 'CURRENT_TIMESTAMP',
- 'DATABASE',
- 'DATABASES',
- 'DAY',
- 'DAY_HOUR',
- 'DAY_MINUTE',
- 'DAY_SECOND',
- 'DEFAULT',
- 'DEFINER',
- 'DELAYED',
- 'DELETE',
- 'DESC',
- 'DESCRIBE',
- 'DETERMINISTIC',
- 'DISTINCT',
- 'DISTINCTROW',
- 'DIV',
- 'DO',
- 'DROP',
- 'DUMPFILE',
- 'DUPLICATE',
- 'DYNAMIC',
- 'ELSE',
- 'ENCLOSED',
- 'END',
- 'ENGINE',
- 'ENGINES',
- 'ENGINE_TYPE',
- 'ESCAPE',
- 'ESCAPED',
- 'EVENTS',
- 'EXEC',
- 'EXECUTE',
- 'EXISTS',
- 'EXPLAIN',
- 'EXTENDED',
- 'FAST',
- 'FETCH',
- 'FIELDS',
- 'FILE',
- 'FIRST',
- 'FIXED',
- 'FLUSH',
- 'FOR',
- 'FORCE',
- 'FOREIGN',
- 'FULL',
- 'FULLTEXT',
- 'FUNCTION',
- 'GLOBAL',
- 'GRANT',
- 'GRANTS',
- 'GROUP_CONCAT',
- 'HEAP',
- 'HIGH_PRIORITY',
- 'HOSTS',
- 'HOUR',
- 'HOUR_MINUTE',
- 'HOUR_SECOND',
- 'IDENTIFIED',
- 'IF',
- 'IFNULL',
- 'IGNORE',
- 'IN',
- 'INDEX',
- 'INDEXES',
- 'INFILE',
- 'INSERT',
- 'INSERT_ID',
- 'INSERT_METHOD',
- 'INTERVAL',
- 'INTO',
- 'INVOKER',
- 'IS',
- 'ISOLATION',
- 'KEY',
- 'KEYS',
- 'KILL',
- 'LAST_INSERT_ID',
- 'LEADING',
- 'LEVEL',
- 'LIKE',
- 'LINEAR',
- 'LINES',
- 'LOAD',
- 'LOCAL',
- 'LOCK',
- 'LOCKS',
- 'LOGS',
- 'LOW_PRIORITY',
- 'MARIA',
- 'MASTER',
- 'MASTER_CONNECT_RETRY',
- 'MASTER_HOST',
- 'MASTER_LOG_FILE',
- 'MATCH',
- 'MAX_CONNECTIONS_PER_HOUR',
- 'MAX_QUERIES_PER_HOUR',
- 'MAX_ROWS',
- 'MAX_UPDATES_PER_HOUR',
- 'MAX_USER_CONNECTIONS',
- 'MEDIUM',
- 'MERGE',
- 'MINUTE',
- 'MINUTE_SECOND',
- 'MIN_ROWS',
- 'MODE',
- 'MODIFY',
- 'MONTH',
- 'MRG_MYISAM',
- 'MYISAM',
- 'NAMES',
- 'NATURAL',
- 'NOT',
- 'NOW()',
- 'NULL',
- 'OFFSET',
- 'ON DELETE',
- 'ON UPDATE',
- 'ON',
- 'ONLY',
- 'OPEN',
- 'OPTIMIZE',
- 'OPTION',
- 'OPTIONALLY',
- 'OUTFILE',
- 'PACK_KEYS',
- 'PAGE',
- 'PARTIAL',
- 'PARTITION',
- 'PARTITIONS',
- 'PASSWORD',
- 'PRIMARY',
- 'PRIVILEGES',
- 'PROCEDURE',
- 'PROCESS',
- 'PROCESSLIST',
- 'PURGE',
- 'QUICK',
- 'RAID0',
- 'RAID_CHUNKS',
- 'RAID_CHUNKSIZE',
- 'RAID_TYPE',
- 'RANGE',
- 'READ',
- 'READ_ONLY',
- 'READ_WRITE',
- 'REFERENCES',
- 'REGEXP',
- 'RELOAD',
- 'RENAME',
- 'REPAIR',
- 'REPEATABLE',
- 'REPLACE',
- 'REPLICATION',
- 'RESET',
- 'RESTORE',
- 'RESTRICT',
- 'RETURN',
- 'RETURNS',
- 'REVOKE',
- 'RLIKE',
- 'ROLLBACK',
- 'ROW',
- 'ROWS',
- 'ROW_FORMAT',
- 'SECOND',
- 'SECURITY',
- 'SEPARATOR',
- 'SERIALIZABLE',
- 'SESSION',
- 'SHARE',
- 'SHOW',
- 'SHUTDOWN',
- 'SLAVE',
- 'SONAME',
- 'SOUNDS',
- 'SQL',
- 'SQL_AUTO_IS_NULL',
- 'SQL_BIG_RESULT',
- 'SQL_BIG_SELECTS',
- 'SQL_BIG_TABLES',
- 'SQL_BUFFER_RESULT',
- 'SQL_CACHE',
- 'SQL_CALC_FOUND_ROWS',
- 'SQL_LOG_BIN',
- 'SQL_LOG_OFF',
- 'SQL_LOG_UPDATE',
- 'SQL_LOW_PRIORITY_UPDATES',
- 'SQL_MAX_JOIN_SIZE',
- 'SQL_NO_CACHE',
- 'SQL_QUOTE_SHOW_CREATE',
- 'SQL_SAFE_UPDATES',
- 'SQL_SELECT_LIMIT',
- 'SQL_SLAVE_SKIP_COUNTER',
- 'SQL_SMALL_RESULT',
- 'SQL_WARNINGS',
- 'START',
- 'STARTING',
- 'STATUS',
- 'STOP',
- 'STORAGE',
- 'STRAIGHT_JOIN',
- 'STRING',
- 'STRIPED',
- 'SUPER',
- 'TABLE',
- 'TABLES',
- 'TEMPORARY',
- 'TERMINATED',
- 'THEN',
- 'TO',
- 'TRAILING',
- 'TRANSACTIONAL',
- 'TRUE',
- 'TRUNCATE',
- 'TYPE',
- 'TYPES',
- 'UNCOMMITTED',
- 'UNIQUE',
- 'UNLOCK',
- 'UNSIGNED',
- 'USAGE',
- 'USE',
- 'USING',
- 'VARIABLES',
- 'VIEW',
- 'WHEN',
- 'WITH',
- 'WORK',
- 'WRITE',
- 'YEAR_MONTH',
-];
-
-const reservedToplevelWords = [
- 'ADD',
- 'AFTER',
- 'ALTER COLUMN',
- 'ALTER TABLE',
- 'DELETE FROM',
- 'EXCEPT',
- 'FETCH FIRST',
- 'FROM',
- 'GROUP BY',
- 'GO',
- 'HAVING',
- 'INSERT INTO',
- 'INSERT',
- 'INTERSECT',
- 'LIMIT',
- 'MODIFY',
- 'ORDER BY',
- 'SELECT',
- 'SET CURRENT SCHEMA',
- 'SET SCHEMA',
- 'SET',
- 'UNION ALL',
- 'UNION',
- 'UPDATE',
- 'VALUES',
- 'WHERE',
-];
-
-const reservedNewlineWords = [
- 'AND',
- 'CROSS APPLY',
- 'CROSS JOIN',
- 'ELSE',
- 'INNER JOIN',
- 'JOIN',
- 'LEFT JOIN',
- 'LEFT OUTER JOIN',
- 'OR',
- 'OUTER APPLY',
- 'OUTER JOIN',
- 'RIGHT JOIN',
- 'RIGHT OUTER JOIN',
- 'WHEN',
- 'XOR',
-];
-
-let tokenizer;
-
-/**
- *
- */
-export default class StandardSqlFormatter {
- /**
- * @param {Object} cfg Different set of configurations
- */
- constructor(cfg) {
- this.cfg = cfg;
- }
-
- /**
- * Format the whitespace in a Standard SQL string to make it easier to read
- *
- * @param {String} query The Standard SQL string
- * @return {String} formatted string
- */
- format(query) {
- if (!tokenizer) {
- tokenizer = new Tokenizer({
- reservedWords,
- reservedToplevelWords,
- reservedNewlineWords,
- stringTypes: [`""`, "N''", "''", '``', '[]'],
- openParens: ['(', 'CASE'],
- closeParens: [')', 'END'],
- indexedPlaceholderTypes: ['?'],
- namedPlaceholderTypes: ['@', ':'],
- lineCommentTypes: ['#', '--'],
- paramsPattern: /^(\$\{[^\}\r\n]+\})/,
- });
- }
- return new Formatter(this.cfg, tokenizer).format(query);
- }
-}
diff --git a/linkis-web-next/src/components/editor/sqlFormatter/sqlFormatter.ts b/linkis-web-next/src/components/editor/sqlFormatter/sqlFormatter.ts
deleted file mode 100644
index 780b04badf..0000000000
--- a/linkis-web-next/src/components/editor/sqlFormatter/sqlFormatter.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Db2Formatter from './languages/Db2Formatter';
-import N1qlFormatter from './languages/N1qlFormatter';
-import PlSqlFormatter from './languages/PlSqlFormatter';
-import StandardSqlFormatter from './languages/StandardSqlFormatter';
-
-export default {
- /**
- * Format whitespaces in a query to make it easier to read.
- *
- * @param {String} query
- * @param {Object} cfg
- * @param {String} cfg.language Query language, default is Standard SQL
- * @param {String} cfg.indent Characters used for indentation, default is " " (2 spaces)
- * @param {Object} cfg.params Collection of params for placeholder replacement
- * @return {String}
- */
- format: (query, cfg) => {
- cfg = cfg || {};
-
- switch (cfg.language) {
- case 'db2':
- return new Db2Formatter(cfg).format(query);
- case 'n1ql':
- return new N1qlFormatter(cfg).format(query);
- case 'pl/sql':
- return new PlSqlFormatter(cfg).format(query);
- case 'sql':
- case undefined:
- return new StandardSqlFormatter(cfg).format(query);
- default:
- throw Error(`Unsupported SQL dialect: ${cfg.language}`);
- }
- },
-};
diff --git a/linkis-web-next/src/components/editor/util.ts b/linkis-web-next/src/components/editor/util.ts
index ce696fd571..91252e0a52 100644
--- a/linkis-web-next/src/components/editor/util.ts
+++ b/linkis-web-next/src/components/editor/util.ts
@@ -16,11 +16,11 @@
* limitations under the License.
*/
-import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
+import monaco from './monaco-loader';
-export const useMonaco = (language = 'json') => {
+export const useMonaco = (language: string) => {
let monacoEditor: monaco.editor.IStandaloneCodeEditor | null = null;
- let initReadOnly = false;
+ let initReadOnly = true;
const updateVal = async (val: string) => {
monacoEditor?.setValue(val);
setTimeout(async () => {
@@ -45,7 +45,7 @@ export const useMonaco = (language = 'json') => {
monaco.editor.create(el, {
language,
minimap: { enabled: false },
- theme: 'vs-light',
+ theme: 'logview',
multiCursorModifier: 'ctrlCmd',
scrollbar: {
verticalScrollbarSize: 8,
@@ -53,6 +53,12 @@ export const useMonaco = (language = 'json') => {
},
tabSize: 2,
automaticLayout: true, // 自适应宽高
+ unicodeHighlight: {
+ ambiguousCharacters: false
+ },
+ glyphMargin: false,
+ selectOnLineNumbers: false,
+ wordWrap: 'on',
...editorOption,
});
return monacoEditor;
diff --git a/linkis-web-next/src/components/sidebar/index.less b/linkis-web-next/src/components/sidebar/index.less
index 49054bafcf..a1d2c7c7ad 100644
--- a/linkis-web-next/src/components/sidebar/index.less
+++ b/linkis-web-next/src/components/sidebar/index.less
@@ -16,30 +16,17 @@
*/
.menu-wrapper {
- width: 200px;
- height: 100vh;
-}
-
-#menu {
- padding-top: 16px;
+ width: 250px;
height: 100%;
-}
-
-.title-text {
- display: flex;
- height: 22px;
- transform: translateX(40px) translateY(-5px);
- font-family: PingFangSC-Regular;
- font-size: 14px;
- color: #0F1222;
- text-align: justify;
- font-weight: 400;
-}
-:deep(.fes-menu-item-label){
- height: 54px;
-}
-img{
- transform: translateX(17px) translateY(20px);
- width: 14px;
- height: 14px;
+ #menu {
+ padding-top: 16px;
+ height: 100%;
+ img {
+ margin: 1px 10px 0 0;
+ }
+ .submenu-item {
+ height: 54px;
+ line-height: 54px;
+ }
+ }
}
\ No newline at end of file
diff --git a/linkis-web-next/src/components/sidebar/index.vue b/linkis-web-next/src/components/sidebar/index.vue
index fe2c2910b3..ffccf5080f 100644
--- a/linkis-web-next/src/components/sidebar/index.vue
+++ b/linkis-web-next/src/components/sidebar/index.vue
@@ -17,12 +17,14 @@