当前位置:   article > 正文

vue2 monoca-editor使用SQL:自动补全、自定义颜色、格式化代码、标记错误_vue项目中使用monaco-editor插件,代码补全怎么实现

vue项目中使用monaco-editor插件,代码补全怎么实现

vue3 monoca-editor SQL:自动补全、自定义颜色、格式化代码、标记错误 

一、安装(注意webpack-plugin对应版本,否则不能运行)

参考 monaco-editor-webpack-plugin版本兼容

yarn add monaco-editor@0.29.1

yarn add monaco-editor-webpack-plugin@5.0.0 -D

二、配置vue.config.js

  1. const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
  2. module.exports = {
  3. configureWebpack: {
  4. plugins: [
  5. new MonacoWebpackPlugin({
  6. language: ['sql']
  7. })
  8. ]
  9. }
  10. }

三、使用

1.导入

  1. // 全局导入
  2. import * as monaco from 'monaco-editor'
  3. // 局部导入需要的功能和依赖
  4. import * as monaco from 'monaco-editor/esm/vs/editor/edcore.main'
  5. import 'monaco-editor/esm/vs/basic-languages/sql/sql.contribution'

2.封装组件

基本框架

  1. <template>
  2. <div id="code"></div>
  3. </template>
  4. <script>
  5. import Vue from 'vue'
  6. import {Component} from 'vue-property-decorator'
  7. import * as monaco from 'monaco-editor/esm/vs/editor/edcore.main'
  8. import 'monaco-editor/esm/vs/basic-languages/sql/sql.contribution'
  9. // import { language } from 'monaco-editor/esm/vs/basic-languages/sql/sql'
  10. // language.keywords插件自带关键词的不全,网上找了一份自己维护
  11. import sqlKeywords from './sqlKeywords.js'
  12. @Component({
  13. props: {
  14. database: String
  15. }
  16. })
  17. export default class SqlEditor extends Vue {
  18. editor = null
  19. color = null
  20. suggestion = null
  21. formatProvider = null
  22. mounted () {
  23. this.initEditor()
  24. }
  25. // 父组件获取值
  26. getValue() {
  27. return this.editor.getValue()
  28. }
  29. // 父组件设置值
  30. setValue(content) {
  31. this.editor.setValue(content)
  32. }
  33. initEditor () {
  34. this.editor = monaco.editor.create(document.getElementById('code'), {
  35. //初始化配置
  36. value: '',
  37. theme: 'vs-dark',
  38. autoIndex: true,
  39. language: 'sql', // 语言类型
  40. tabCompletion: 'on',
  41. cursorSmoothCaretAnimation: true,
  42. formatOnPaste: true,
  43. mouseWheelZoom: true,
  44. folding: true, //代码折叠
  45. autoClosingBrackets: 'always',
  46. autoClosingOvertype: 'always',
  47. autoClosingQuotes: 'always',
  48. automaticLayout: 'always'
  49. })
  50. }
  51. }
  52. </script>

自定义提示

  1. databaseData = {
  2. a: ['group', 'area'],
  3. b: ['user', 'client']
  4. }
  5. tableData = {
  6. user: ['age', 'gender'],
  7. group: ['id', 'name']
  8. }
  9. // 关键字
  10. getSQLSuggest () {
  11. return sqlKeywords.map((key) => ({
  12. label: key,
  13. kind: monaco.languages.CompletionItemKind.Keyword,
  14. insertText: key,
  15. detail: 'keyword'
  16. }))
  17. }
  18. // 表名
  19. getTableSuggest (dbName) {
  20. const tableNames = this.databaseData[dbName]
  21. if (!tableNames) {
  22. return []
  23. }
  24. return tableNames.map((name) => ({
  25. label: name,
  26. kind: monaco.languages.CompletionItemKind.Constant,
  27. insertText: name,
  28. detail: dbName
  29. }))
  30. }
  31. // 字段名
  32. getParamSuggest (tableName) {
  33. const params = this.tableData[tableName]
  34. if (!params) {
  35. return []
  36. }
  37. return params.map((name) => ({
  38. label: name,
  39. kind: monaco.languages.CompletionItemKind.Constant,
  40. insertText: name,
  41. detail: 'param'
  42. }))
  43. }
  44. // 数据库名
  45. getDBSuggest () {
  46. return Object.keys(this.databaseData).map((key) => ({
  47. label: key,
  48. kind: monaco.languages.CompletionItemKind.Enum,
  49. insertText: key,
  50. detail: 'database'
  51. }))
  52. }
  53. initEditor () {
  54. // 自动补全提示
  55. this.suggestion = monaco.languages.registerCompletionItemProvider('sql', {
  56. // 触发条件,也可以不写,不写的话只要输入满足配置的label就会提示;仅支持单字符
  57. triggerCharacters: ['.', ' '],
  58. provideCompletionItems: (model, position) => {
  59. let suggestions = []
  60. const { lineNumber, column } = position
  61. const textBeforePointer = model.getValueInRange({
  62. startLineNumber: lineNumber,
  63. startColumn: 0,
  64. endLineNumber: lineNumber,
  65. endColumn: column,
  66. })
  67. const tokens = textBeforePointer.toLocaleLowerCase().trim().split(/\s+/)
  68. const lastToken = tokens[tokens.length - 1] // 获取最后一段非空字符串
  69. if (lastToken.endsWith('.')) {
  70. // 提示该数据库下的表名
  71. const tokenNoDot = lastToken.slice(0, lastToken.length - 1)
  72. if (Object.keys(this.databaseData).includes(tokenNoDot)) {
  73. suggestions = [...this.getTableSuggest(tokenNoDot)]
  74. }
  75. } else if (lastToken === '.') {
  76. suggestions = []
  77. } else if (textBeforePointer.endsWith(' ')) {
  78. if (textBeforePointer.endsWith('select * from ')) {
  79. // select * from 提示指定数据库的表名
  80. suggestions = this.getTableSuggest(this.database)
  81. } else if (lastToken === 'where') {
  82. const lastToken2 = tokens[tokens.length - 2]
  83. const lastToken3 = tokens[tokens.length - 3]
  84. const lastToken4 = tokens[tokens.length - 4]
  85. const lastToken5 = tokens[tokens.length - 5]
  86. if (lastToken5 + lastToken4 + lastToken3 === 'select*from') {
  87. // select * from tableName where 提示指定表的字段名
  88. suggestions = [...this.getParamSuggest(lastToken2)]
  89. } else {
  90. suggestions = []
  91. }
  92. }else {
  93. suggestions = []
  94. }
  95. } else {
  96. // 提示数据库名和关键词
  97. suggestions = [...this.getDBSuggest(), ...this.getSQLSuggest()]
  98. }
  99. return {
  100. suggestions,
  101. }
  102. }
  103. })
  104. }

 自定义文本颜色,自带也有

  1. initEditor() {
  2. //自定义文本颜色,也可以不设置,自带也有颜色区分
  3. let reg = '/'
  4. sqlKeywords.forEach((keyword) => {
  5. reg += `${keyword}|`
  6. })
  7. reg += '/'
  8. this.color = monaco.languages.setMonarchTokensProvider('sql', {
  9. ignoreCase: true,
  10. tokenizer: {
  11. root: [
  12. [
  13. reg,
  14. { token: 'keyword' },
  15. ], //蓝色
  16. [
  17. /[+]|[-]|[*]|[/]|[%]|[>]|[<]|[=]|[!]|[:]|[&&]|[||]/,
  18. { token: 'string' },
  19. ], //红色
  20. [/'.*?'|".*?"/, { token: 'string.escape' }], //橙色
  21. [/#--.*?\--#/, { token: 'comment' }], //绿色
  22. [/null/, { token: 'regexp' }], //粉色
  23. [/[{]|[}]/, { token: 'type' }], //青色
  24. [/[\u4e00-\u9fa5]/, { token: 'predefined' }],//亮粉色
  25. [/''/, { token: 'invalid' }],//红色
  26. [/[\u4e00-\u9fa5]/, { token: 'number.binary' }],//浅绿
  27. [/(?!.*[a-zA-Z])[0-9]/, { token: 'number.hex' }], //浅绿
  28. [/[(]|[)]/, { token: 'number.octal' }], //浅绿
  29. [/[\u4e00-\u9fa5]/, { token: 'number.float' }],//浅绿
  30. ]
  31. }
  32. })
  33. }

 格式化代码&标记错误

yarn add  sql-formatter@10.7.2 -D

  1. import { format } from 'sql-formatter'
  2. initEditor() {
  3. // 改写插件自带格式化功能
  4. const self = this
  5. this.formatProvider = monaco.languages.registerDocumentFormattingEditProvider('sql', {
  6. provideDocumentFormattingEdits(model) {
  7. return [{
  8. text: self.formatSql(1),
  9. range: model.getFullModelRange()
  10. }]
  11. }
  12. })
  13. }
  14. // 格式化代码
  15. formatSql(needValue) {
  16. this.clearMistake()
  17. try {
  18. this.setValue(format((this.editor).getValue()))
  19. } catch (e) {
  20. const {message} = e
  21. const list = message.split(' ')
  22. const line = list.indexOf('line')
  23. const column = list.indexOf('column')
  24. this.markMistake({
  25. startLineNumber: Number(list[line + 1]),
  26. endLineNumber: Number(list[line + 1]),
  27. startColumn: Number(list[column + 1]),
  28. endColumn: Number(list[column + 1])
  29. }, 'Error', message)
  30. }
  31. if (needValue) {
  32. return this.editor.getValue()
  33. }
  34. }
  35. // 标记错误信息
  36. markMistake(range, type, message) {
  37. const {startLineNumber, endLineNumber, startColumn, endColumn} = range
  38. monaco.editor.setModelMarkers(
  39. this.editor.getModel(),
  40. 'eslint',
  41. [{
  42. startLineNumber,
  43. endLineNumber,
  44. startColumn,
  45. endColumn,
  46. severity: monaco.MarkerSeverity[type], // type可以是Error,Warning,Info
  47. message
  48. }]
  49. )
  50. }
  51. // 清除错误信息
  52. clearMistake() {
  53. monaco.editor.setModelMarkers(
  54. this.editor.getModel(),
  55. 'eslint',
  56. []
  57. )
  58. }

 监听值变化

  1. initEditor() {
  2. this.editor.onDidChangeModelContent(() => {
  3. console.log('value', this.editor.getValue())
  4. })
  5. }

销毁编辑器及其配置,防止自定义提示数据重复

  1. beforeDestroy () {
  2. if (this.editor) {
  3. this.clearMistake()
  4. this.editor.dispose()
  5. this.color.dispose()
  6. this.suggestion.dispose()
  7. this.formatProvider.dispose()
  8. }
  9. }

--------------------------------------------------------------------------------------------------------------------------------

更新:附上SqlKeywords.js

  1. // SqlKeywords.js
  2. export default [
  3. 'ACCESSIBLE',
  4. 'ACCOUNT',
  5. 'ACTION',
  6. 'ADD',
  7. 'AFTER',
  8. 'AGAINST',
  9. 'AGGREGATE',
  10. 'ALGORITHM',
  11. 'ALL',
  12. 'ALTER',
  13. 'ALWAYS',
  14. 'ANALYSE',
  15. 'ANALYZE',
  16. 'AND',
  17. 'ANY',
  18. 'AS',
  19. 'ASC',
  20. 'ASCII',
  21. 'ASENSITIVE',
  22. 'AT',
  23. 'AUTOEXTEND_SIZE',
  24. 'AUTO_INCREMENT',
  25. 'AVG',
  26. 'AVG_ROW_LENGTH',
  27. 'BACKUP',
  28. 'BEFORE',
  29. 'BEGIN',
  30. 'BETWEEN',
  31. 'BIGINT',
  32. 'BINARY',
  33. 'BINLOG',
  34. 'BIT',
  35. 'BLOB',
  36. 'BLOCK',
  37. 'BOOL',
  38. 'BOOLEAN',
  39. 'BOTH',
  40. 'BTREE',
  41. 'BY',
  42. 'BYTE',
  43. 'CACHE',
  44. 'CALL',
  45. 'CASCADE',
  46. 'CASCADED',
  47. 'CASE',
  48. 'CATALOG_NAME',
  49. 'CHAIN',
  50. 'CHANGE',
  51. 'CHANGED',
  52. 'CHANNEL',
  53. 'CHAR',
  54. 'CHARACTER',
  55. 'CHARSET',
  56. 'CHECK',
  57. 'CHECKSUM',
  58. 'CIPHER',
  59. 'CLASS_ORIGIN',
  60. 'CLIENT',
  61. 'CLOSE',
  62. 'COALESCE',
  63. 'CODE',
  64. 'COLLATE',
  65. 'COLLATION',
  66. 'COLUMN',
  67. 'COLUMNS',
  68. 'COLUMN_FORMAT',
  69. 'COLUMN_NAME',
  70. 'COMMENT',
  71. 'COMMIT',
  72. 'COMMITTED',
  73. 'COMPACT',
  74. 'COMPLETION',
  75. 'COMPRESSED',
  76. 'COMPRESSION',
  77. 'CONCURRENT',
  78. 'CONDITION',
  79. 'CONNECTION',
  80. 'CONSISTENT',
  81. 'CONSTRAINT',
  82. 'CONSTRAINT_CATALOG',
  83. 'CONSTRAINT_NAME',
  84. 'CONSTRAINT_SCHEMA',
  85. 'CONTAINS',
  86. 'CONTEXT',
  87. 'CONTINUE',
  88. 'CONVERT',
  89. 'CPU',
  90. 'CREATE',
  91. 'CROSS',
  92. 'CUBE',
  93. 'CURRENT',
  94. 'CURRENT_DATE',
  95. 'CURRENT_TIME',
  96. 'CURRENT_TIMESTAMP',
  97. 'CURRENT_USER',
  98. 'CURSOR',
  99. 'CURSOR_NAME',
  100. 'DATA',
  101. 'DATABASE',
  102. 'DATABASES',
  103. 'DATAFILE',
  104. 'DATE',
  105. 'DATETIME',
  106. 'DAY',
  107. 'DAY_HOUR',
  108. 'DAY_MICROSECOND',
  109. 'DAY_MINUTE',
  110. 'DAY_SECOND',
  111. 'DEALLOCATE',
  112. 'DEC',
  113. 'DECIMAL',
  114. 'DECLARE',
  115. 'DEFAULT',
  116. 'DEFAULT_AUTH',
  117. 'DEFINER',
  118. 'DELAYED',
  119. 'DELAY_KEY_WRITE',
  120. 'DELETE',
  121. 'DESC',
  122. 'DESCRIBE',
  123. 'DES_KEY_FILE',
  124. 'DETERMINISTIC',
  125. 'DIAGNOSTICS',
  126. 'DIRECTORY',
  127. 'DISABLE',
  128. 'DISCARD',
  129. 'DISK',
  130. 'DISTINCT',
  131. 'DISTINCTROW',
  132. 'DIV',
  133. 'DO',
  134. 'DOUBLE',
  135. 'DROP',
  136. 'DUAL',
  137. 'DUMPFILE',
  138. 'DUPLICATE',
  139. 'DYNAMIC',
  140. 'EACH',
  141. 'ELSE',
  142. 'ELSEIF',
  143. 'ENABLE',
  144. 'ENCLOSED',
  145. 'ENCRYPTION',
  146. 'END',
  147. 'ENDS',
  148. 'ENGINE',
  149. 'ENGINES',
  150. 'ENUM',
  151. 'ERROR',
  152. 'ERRORS',
  153. 'ESCAPE',
  154. 'ESCAPED',
  155. 'EVENT',
  156. 'EVENTS',
  157. 'EVERY',
  158. 'EXCHANGE',
  159. 'EXECUTE',
  160. 'EXISTS',
  161. 'EXIT',
  162. 'EXPANSION',
  163. 'EXPIRE',
  164. 'EXPLAIN',
  165. 'EXPORT',
  166. 'EXTENDED',
  167. 'EXTENT_SIZE',
  168. 'FALSE',
  169. 'FAST',
  170. 'FAULTS',
  171. 'FETCH',
  172. 'FIELDS',
  173. 'FILE',
  174. 'FILE_BLOCK_SIZE',
  175. 'FILTER',
  176. 'FIRST',
  177. 'FIXED',
  178. 'FLOAT',
  179. 'FLOAT4',
  180. 'FLOAT8',
  181. 'FLUSH',
  182. 'FOLLOWS',
  183. 'FOR',
  184. 'FORCE',
  185. 'FOREIGN',
  186. 'FORMAT',
  187. 'FOUND',
  188. 'FROM',
  189. 'FULL',
  190. 'FULLTEXT',
  191. 'FUNCTION',
  192. 'GENERAL',
  193. 'GENERATED',
  194. 'GEOMETRY',
  195. 'GEOMETRYCOLLECTION',
  196. 'GET',
  197. 'GET_FORMAT',
  198. 'GLOBAL',
  199. 'GRANT',
  200. 'GRANTS',
  201. 'GROUP',
  202. 'GROUP_REPLICATION',
  203. 'HANDLER',
  204. 'HASH',
  205. 'HAVING',
  206. 'HELP',
  207. 'HIGH_PRIORITY',
  208. 'HOST',
  209. 'HOSTS',
  210. 'HOUR',
  211. 'HOUR_MICROSECOND',
  212. 'HOUR_MINUTE',
  213. 'HOUR_SECOND',
  214. 'IDENTIFIED',
  215. 'IF',
  216. 'IGNORE',
  217. 'IGNORE_SERVER_IDS',
  218. 'IMPORT',
  219. 'IN',
  220. 'INDEX',
  221. 'INDEXES',
  222. 'INFILE',
  223. 'INITIAL_SIZE',
  224. 'INNER',
  225. 'INOUT',
  226. 'INSENSITIVE',
  227. 'INSERT',
  228. 'INSERT_METHOD',
  229. 'INSTALL',
  230. 'INSTANCE',
  231. 'INT',
  232. 'INT1',
  233. 'INT2',
  234. 'INT3',
  235. 'INT4',
  236. 'INT8',
  237. 'INTEGER',
  238. 'INTERVAL',
  239. 'INTO',
  240. 'INVOKER',
  241. 'IO',
  242. 'IO_AFTER_GTIDS',
  243. 'IO_BEFORE_GTIDS',
  244. 'IO_THREAD',
  245. 'IPC',
  246. 'IS',
  247. 'ISOLATION',
  248. 'ISSUER',
  249. 'ITERATE',
  250. 'JOIN',
  251. 'JSON',
  252. 'KEY',
  253. 'KEYS',
  254. 'KEY_BLOCK_SIZE',
  255. 'KILL',
  256. 'LANGUAGE',
  257. 'LAST',
  258. 'LEADING',
  259. 'LEAVE',
  260. 'LEAVES',
  261. 'LEFT',
  262. 'LESS',
  263. 'LEVEL',
  264. 'LIKE',
  265. 'LIMIT',
  266. 'LINEAR',
  267. 'LINES',
  268. 'LINESTRING',
  269. 'LIST',
  270. 'LOAD',
  271. 'LOCAL',
  272. 'LOCALTIME',
  273. 'LOCALTIMESTAMP',
  274. 'LOCK',
  275. 'LOCKS',
  276. 'LOGFILE',
  277. 'LOGS',
  278. 'LONG',
  279. 'LONGBLOB',
  280. 'LONGTEXT',
  281. 'LOOP',
  282. 'LOW_PRIORITY',
  283. 'MASTER',
  284. 'MASTER_AUTO_POSITION',
  285. 'MASTER_BIND',
  286. 'MASTER_CONNECT_RETRY',
  287. 'MASTER_DELAY',
  288. 'MASTER_HEARTBEAT_PERIOD',
  289. 'MASTER_HOST',
  290. 'MASTER_LOG_FILE',
  291. 'MASTER_LOG_POS',
  292. 'MASTER_PASSWORD',
  293. 'MASTER_PORT',
  294. 'MASTER_RETRY_COUNT',
  295. 'MASTER_SERVER_ID',
  296. 'MASTER_SSL',
  297. 'MASTER_SSL_CA',
  298. 'MASTER_SSL_CAPATH',
  299. 'MASTER_SSL_CERT',
  300. 'MASTER_SSL_CIPHER',
  301. 'MASTER_SSL_CRL',
  302. 'MASTER_SSL_CRLPATH',
  303. 'MASTER_SSL_KEY',
  304. 'MASTER_SSL_VERIFY_SERVER_CERT',
  305. 'MASTER_TLS_VERSION',
  306. 'MASTER_USER',
  307. 'MATCH',
  308. 'MAXVALUE',
  309. 'MAX_CONNECTIONS_PER_HOUR',
  310. 'MAX_QUERIES_PER_HOUR',
  311. 'MAX_ROWS',
  312. 'MAX_SIZE',
  313. 'MAX_STATEMENT_TIME',
  314. 'MAX_UPDATES_PER_HOUR',
  315. 'MAX_USER_CONNECTIONS',
  316. 'MEDIUM',
  317. 'MEDIUMBLOB',
  318. 'MEDIUMINT',
  319. 'MEDIUMTEXT',
  320. 'MEMORY',
  321. 'MERGE',
  322. 'MESSAGE_TEXT',
  323. 'MICROSECOND',
  324. 'MIDDLEINT',
  325. 'MIGRATE',
  326. 'MINUTE',
  327. 'MINUTE_MICROSECOND',
  328. 'MINUTE_SECOND',
  329. 'MIN_ROWS',
  330. 'MOD',
  331. 'MODE',
  332. 'MODIFIES',
  333. 'MODIFY',
  334. 'MONTH',
  335. 'MULTILINESTRING',
  336. 'MULTIPOINT',
  337. 'MULTIPOLYGON',
  338. 'MUTEX',
  339. 'MYSQL_ERRNO',
  340. 'NAME',
  341. 'NAMES',
  342. 'NATIONAL',
  343. 'NATURAL',
  344. 'NCHAR',
  345. 'NDB',
  346. 'NDBCLUSTER',
  347. 'NEVER',
  348. 'NEW',
  349. 'NEXT',
  350. 'NO',
  351. 'NODEGROUP',
  352. 'NONBLOCKING',
  353. 'NONE',
  354. 'NOT',
  355. 'NO_WAIT',
  356. 'NO_WRITE_TO_BINLOG',
  357. 'NULL',
  358. 'NUMBER',
  359. 'NUMERIC',
  360. 'NVARCHAR',
  361. 'OFFSET',
  362. 'OLD_PASSWORD',
  363. 'ON',
  364. 'ONE',
  365. 'ONLY',
  366. 'OPEN',
  367. 'OPTIMIZE',
  368. 'OPTIMIZER_COSTS',
  369. 'OPTION',
  370. 'OPTIONALLY',
  371. 'OPTIONS',
  372. 'OR',
  373. 'ORDER',
  374. 'OUT',
  375. 'OUTER',
  376. 'OUTFILE',
  377. 'OWNER',
  378. 'PACK_KEYS',
  379. 'PAGE',
  380. 'PARSER',
  381. 'PARSE_GCOL_EXPR',
  382. 'PARTIAL',
  383. 'PARTITION',
  384. 'PARTITIONING',
  385. 'PARTITIONS',
  386. 'PASSWORD',
  387. 'PHASE',
  388. 'PLUGIN',
  389. 'PLUGINS',
  390. 'PLUGIN_DIR',
  391. 'POINT',
  392. 'POLYGON',
  393. 'PORT',
  394. 'PRECEDES',
  395. 'PRECISION',
  396. 'PREPARE',
  397. 'PRESERVE',
  398. 'PREV',
  399. 'PRIMARY',
  400. 'PRIVILEGES',
  401. 'PROCEDURE',
  402. 'PROCESSLIST',
  403. 'PROFILE',
  404. 'PROFILES',
  405. 'PROXY',
  406. 'PURGE',
  407. 'QUARTER',
  408. 'QUERY',
  409. 'QUICK',
  410. 'RANGE',
  411. 'READ',
  412. 'READS',
  413. 'READ_ONLY',
  414. 'READ_WRITE',
  415. 'REAL',
  416. 'REBUILD',
  417. 'RECOVER',
  418. 'REDOFILE',
  419. 'REDO_BUFFER_SIZE',
  420. 'REDUNDANT',
  421. 'REFERENCES',
  422. 'REGEXP',
  423. 'RELAY',
  424. 'RELAYLOG',
  425. 'RELAY_LOG_FILE',
  426. 'RELAY_LOG_POS',
  427. 'RELAY_THREAD',
  428. 'RELEASE',
  429. 'RELOAD',
  430. 'REMOVE',
  431. 'RENAME',
  432. 'REORGANIZE',
  433. 'REPAIR',
  434. 'REPEAT',
  435. 'REPEATABLE',
  436. 'REPLACE',
  437. 'REPLICATE_DO_DB',
  438. 'REPLICATE_DO_TABLE',
  439. 'REPLICATE_IGNORE_DB',
  440. 'REPLICATE_IGNORE_TABLE',
  441. 'REPLICATE_REWRITE_DB',
  442. 'REPLICATE_WILD_DO_TABLE',
  443. 'REPLICATE_WILD_IGNORE_TABLE',
  444. 'REPLICATION',
  445. 'REQUIRE',
  446. 'RESET',
  447. 'RESIGNAL',
  448. 'RESTORE',
  449. 'RESTRICT',
  450. 'RESUME',
  451. 'RETURN',
  452. 'RETURNED_SQLSTATE',
  453. 'RETURNS',
  454. 'REVERSE',
  455. 'REVOKE',
  456. 'RIGHT',
  457. 'RLIKE',
  458. 'ROLLBACK',
  459. 'ROLLUP',
  460. 'ROTATE',
  461. 'ROUTINE',
  462. 'ROW',
  463. 'ROWS',
  464. 'ROW_COUNT',
  465. 'ROW_FORMAT',
  466. 'RTREE',
  467. 'SAVEPOINT',
  468. 'SCHEDULE',
  469. 'SCHEMA',
  470. 'SCHEMAS',
  471. 'SCHEMA_NAME',
  472. 'SECOND',
  473. 'SECOND_MICROSECOND',
  474. 'SECURITY',
  475. 'SELECT',
  476. 'SENSITIVE',
  477. 'SEPARATOR',
  478. 'SERIAL',
  479. 'SERIALIZABLE',
  480. 'SERVER',
  481. 'SESSION',
  482. 'SET',
  483. 'SHARE',
  484. 'SHOW',
  485. 'SHUTDOWN',
  486. 'SIGNAL',
  487. 'SIGNED',
  488. 'SIMPLE',
  489. 'SLAVE',
  490. 'SLOW',
  491. 'SMALLINT',
  492. 'SNAPSHOT',
  493. 'SOCKET',
  494. 'SOME',
  495. 'SONAME',
  496. 'SOUNDS',
  497. 'SOURCE',
  498. 'SPATIAL',
  499. 'SPECIFIC',
  500. 'SQL',
  501. 'SQLEXCEPTION',
  502. 'SQLSTATE',
  503. 'SQLWARNING',
  504. 'SQL_AFTER_GTIDS',
  505. 'SQL_AFTER_MTS_GAPS',
  506. 'SQL_BEFORE_GTIDS',
  507. 'SQL_BIG_RESULT',
  508. 'SQL_BUFFER_RESULT',
  509. 'SQL_CACHE',
  510. 'SQL_CALC_FOUND_ROWS',
  511. 'SQL_NO_CACHE',
  512. 'SQL_SMALL_RESULT',
  513. 'SQL_THREAD',
  514. 'SQL_TSI_DAY',
  515. 'SQL_TSI_HOUR',
  516. 'SQL_TSI_MINUTE',
  517. 'SQL_TSI_MONTH',
  518. 'SQL_TSI_QUARTER',
  519. 'SQL_TSI_SECOND',
  520. 'SQL_TSI_WEEK',
  521. 'SQL_TSI_YEAR',
  522. 'SSL',
  523. 'STACKED',
  524. 'START',
  525. 'STARTING',
  526. 'STARTS',
  527. 'STATS_AUTO_RECALC',
  528. 'STATS_PERSISTENT',
  529. 'STATS_SAMPLE_PAGES',
  530. 'STATUS',
  531. 'STOP',
  532. 'STORAGE',
  533. 'STORED',
  534. 'STRAIGHT_JOIN',
  535. 'STRING',
  536. 'SUBCLASS_ORIGIN',
  537. 'SUBJECT',
  538. 'SUBPARTITION',
  539. 'SUBPARTITIONS',
  540. 'SUPER',
  541. 'SUSPEND',
  542. 'SWAPS',
  543. 'SWITCHES',
  544. 'TABLE',
  545. 'TABLES',
  546. 'TABLESPACE',
  547. 'TABLE_CHECKSUM',
  548. 'TABLE_NAME',
  549. 'TEMPORARY',
  550. 'TEMPTABLE',
  551. 'TERMINATED',
  552. 'TEXT',
  553. 'THAN',
  554. 'THEN',
  555. 'TIME',
  556. 'TIMESTAMP',
  557. 'TIMESTAMPADD',
  558. 'TIMESTAMPDIFF',
  559. 'TINYBLOB',
  560. 'TINYINT',
  561. 'TINYTEXT',
  562. 'TO',
  563. 'TRAILING',
  564. 'TRANSACTION',
  565. 'TRIGGER',
  566. 'TRIGGERS',
  567. 'TRUE',
  568. 'TRUNCATE',
  569. 'TYPE',
  570. 'TYPES',
  571. 'UNCOMMITTED',
  572. 'UNDEFINED',
  573. 'UNDO',
  574. 'UNDOFILE',
  575. 'UNDO_BUFFER_SIZE',
  576. 'UNICODE',
  577. 'UNINSTALL',
  578. 'UNION',
  579. 'UNIQUE',
  580. 'UNKNOWN',
  581. 'UNLOCK',
  582. 'UNSIGNED',
  583. 'UNTIL',
  584. 'UPDATE',
  585. 'UPGRADE',
  586. 'USAGE',
  587. 'USE',
  588. 'USER',
  589. 'USER_RESOURCES',
  590. 'USE_FRM',
  591. 'USING',
  592. 'UTC_DATE',
  593. 'UTC_TIME',
  594. 'UTC_TIMESTAMP',
  595. 'VALIDATION',
  596. 'VALUE',
  597. 'VALUES',
  598. 'VARBINARY',
  599. 'VARCHAR',
  600. 'VARCHARACTER',
  601. 'VARIABLES',
  602. 'VARYING',
  603. 'VIEW',
  604. 'VIRTUAL',
  605. 'WAIT',
  606. 'WARNINGS',
  607. 'WEEK',
  608. 'WEIGHT_STRING',
  609. 'WHEN',
  610. 'WHERE',
  611. 'WHILE',
  612. 'WITH',
  613. 'WITHOUT',
  614. 'WORK',
  615. 'WRAPPER',
  616. 'WRITE',
  617. 'X509',
  618. 'XA',
  619. 'XID',
  620. 'XML',
  621. 'XOR',
  622. 'YEAR',
  623. 'YEAR_MONTH',
  624. 'ZEROFILL'
  625. ]

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/710261
推荐阅读
相关标签
  

闽ICP备14008679号