reserved_words.py 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. # mysql/reserved_words.py
  2. # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
  3. # <see AUTHORS file>
  4. #
  5. # This module is part of SQLAlchemy and is released under
  6. # the MIT License: https://www.opensource.org/licenses/mit-license.php
  7. # generated using:
  8. # https://gist.github.com/kkirsche/4f31f2153ed7a3248be1ec44ca6ddbc9
  9. #
  10. # https://mariadb.com/kb/en/reserved-words/
  11. # includes: Reserved Words, Oracle Mode (separate set unioned)
  12. # excludes: Exceptions, Function Names
  13. RESERVED_WORDS_MARIADB = {
  14. "accessible",
  15. "add",
  16. "all",
  17. "alter",
  18. "analyze",
  19. "and",
  20. "as",
  21. "asc",
  22. "asensitive",
  23. "before",
  24. "between",
  25. "bigint",
  26. "binary",
  27. "blob",
  28. "both",
  29. "by",
  30. "call",
  31. "cascade",
  32. "case",
  33. "change",
  34. "char",
  35. "character",
  36. "check",
  37. "collate",
  38. "column",
  39. "condition",
  40. "constraint",
  41. "continue",
  42. "convert",
  43. "create",
  44. "cross",
  45. "current_date",
  46. "current_role",
  47. "current_time",
  48. "current_timestamp",
  49. "current_user",
  50. "cursor",
  51. "database",
  52. "databases",
  53. "day_hour",
  54. "day_microsecond",
  55. "day_minute",
  56. "day_second",
  57. "dec",
  58. "decimal",
  59. "declare",
  60. "default",
  61. "delayed",
  62. "delete",
  63. "desc",
  64. "describe",
  65. "deterministic",
  66. "distinct",
  67. "distinctrow",
  68. "div",
  69. "do_domain_ids",
  70. "double",
  71. "drop",
  72. "dual",
  73. "each",
  74. "else",
  75. "elseif",
  76. "enclosed",
  77. "escaped",
  78. "except",
  79. "exists",
  80. "exit",
  81. "explain",
  82. "false",
  83. "fetch",
  84. "float",
  85. "float4",
  86. "float8",
  87. "for",
  88. "force",
  89. "foreign",
  90. "from",
  91. "fulltext",
  92. "general",
  93. "grant",
  94. "group",
  95. "having",
  96. "high_priority",
  97. "hour_microsecond",
  98. "hour_minute",
  99. "hour_second",
  100. "if",
  101. "ignore",
  102. "ignore_domain_ids",
  103. "ignore_server_ids",
  104. "in",
  105. "index",
  106. "infile",
  107. "inner",
  108. "inout",
  109. "insensitive",
  110. "insert",
  111. "int",
  112. "int1",
  113. "int2",
  114. "int3",
  115. "int4",
  116. "int8",
  117. "integer",
  118. "intersect",
  119. "interval",
  120. "into",
  121. "is",
  122. "iterate",
  123. "join",
  124. "key",
  125. "keys",
  126. "kill",
  127. "leading",
  128. "leave",
  129. "left",
  130. "like",
  131. "limit",
  132. "linear",
  133. "lines",
  134. "load",
  135. "localtime",
  136. "localtimestamp",
  137. "lock",
  138. "long",
  139. "longblob",
  140. "longtext",
  141. "loop",
  142. "low_priority",
  143. "master_heartbeat_period",
  144. "master_ssl_verify_server_cert",
  145. "match",
  146. "maxvalue",
  147. "mediumblob",
  148. "mediumint",
  149. "mediumtext",
  150. "middleint",
  151. "minute_microsecond",
  152. "minute_second",
  153. "mod",
  154. "modifies",
  155. "natural",
  156. "no_write_to_binlog",
  157. "not",
  158. "null",
  159. "numeric",
  160. "offset",
  161. "on",
  162. "optimize",
  163. "option",
  164. "optionally",
  165. "or",
  166. "order",
  167. "out",
  168. "outer",
  169. "outfile",
  170. "over",
  171. "page_checksum",
  172. "parse_vcol_expr",
  173. "partition",
  174. "position",
  175. "precision",
  176. "primary",
  177. "procedure",
  178. "purge",
  179. "range",
  180. "read",
  181. "read_write",
  182. "reads",
  183. "real",
  184. "recursive",
  185. "ref_system_id",
  186. "references",
  187. "regexp",
  188. "release",
  189. "rename",
  190. "repeat",
  191. "replace",
  192. "require",
  193. "resignal",
  194. "restrict",
  195. "return",
  196. "returning",
  197. "revoke",
  198. "right",
  199. "rlike",
  200. "rows",
  201. "schema",
  202. "schemas",
  203. "second_microsecond",
  204. "select",
  205. "sensitive",
  206. "separator",
  207. "set",
  208. "show",
  209. "signal",
  210. "slow",
  211. "smallint",
  212. "spatial",
  213. "specific",
  214. "sql",
  215. "sql_big_result",
  216. "sql_calc_found_rows",
  217. "sql_small_result",
  218. "sqlexception",
  219. "sqlstate",
  220. "sqlwarning",
  221. "ssl",
  222. "starting",
  223. "stats_auto_recalc",
  224. "stats_persistent",
  225. "stats_sample_pages",
  226. "straight_join",
  227. "table",
  228. "terminated",
  229. "then",
  230. "tinyblob",
  231. "tinyint",
  232. "tinytext",
  233. "to",
  234. "trailing",
  235. "trigger",
  236. "true",
  237. "undo",
  238. "union",
  239. "unique",
  240. "unlock",
  241. "unsigned",
  242. "update",
  243. "usage",
  244. "use",
  245. "using",
  246. "utc_date",
  247. "utc_time",
  248. "utc_timestamp",
  249. "values",
  250. "varbinary",
  251. "varchar",
  252. "varcharacter",
  253. "varying",
  254. "when",
  255. "where",
  256. "while",
  257. "window",
  258. "with",
  259. "write",
  260. "xor",
  261. "year_month",
  262. "zerofill",
  263. }.union(
  264. {
  265. "body",
  266. "elsif",
  267. "goto",
  268. "history",
  269. "others",
  270. "package",
  271. "period",
  272. "raise",
  273. "rowtype",
  274. "system",
  275. "system_time",
  276. "versioning",
  277. "without",
  278. }
  279. )
  280. # https://dev.mysql.com/doc/refman/8.0/en/keywords.html
  281. # https://dev.mysql.com/doc/refman/5.7/en/keywords.html
  282. # https://dev.mysql.com/doc/refman/5.6/en/keywords.html
  283. # includes: MySQL x.0 Keywords and Reserved Words
  284. # excludes: MySQL x.0 New Keywords and Reserved Words,
  285. # MySQL x.0 Removed Keywords and Reserved Words
  286. RESERVED_WORDS_MYSQL = {
  287. "accessible",
  288. "add",
  289. "admin",
  290. "all",
  291. "alter",
  292. "analyze",
  293. "and",
  294. "array",
  295. "as",
  296. "asc",
  297. "asensitive",
  298. "before",
  299. "between",
  300. "bigint",
  301. "binary",
  302. "blob",
  303. "both",
  304. "by",
  305. "call",
  306. "cascade",
  307. "case",
  308. "change",
  309. "char",
  310. "character",
  311. "check",
  312. "collate",
  313. "column",
  314. "condition",
  315. "constraint",
  316. "continue",
  317. "convert",
  318. "create",
  319. "cross",
  320. "cube",
  321. "cume_dist",
  322. "current_date",
  323. "current_time",
  324. "current_timestamp",
  325. "current_user",
  326. "cursor",
  327. "database",
  328. "databases",
  329. "day_hour",
  330. "day_microsecond",
  331. "day_minute",
  332. "day_second",
  333. "dec",
  334. "decimal",
  335. "declare",
  336. "default",
  337. "delayed",
  338. "delete",
  339. "dense_rank",
  340. "desc",
  341. "describe",
  342. "deterministic",
  343. "distinct",
  344. "distinctrow",
  345. "div",
  346. "double",
  347. "drop",
  348. "dual",
  349. "each",
  350. "else",
  351. "elseif",
  352. "empty",
  353. "enclosed",
  354. "escaped",
  355. "except",
  356. "exists",
  357. "exit",
  358. "explain",
  359. "false",
  360. "fetch",
  361. "first_value",
  362. "float",
  363. "float4",
  364. "float8",
  365. "for",
  366. "force",
  367. "foreign",
  368. "from",
  369. "fulltext",
  370. "function",
  371. "general",
  372. "generated",
  373. "get",
  374. "get_master_public_key",
  375. "grant",
  376. "group",
  377. "grouping",
  378. "groups",
  379. "having",
  380. "high_priority",
  381. "hour_microsecond",
  382. "hour_minute",
  383. "hour_second",
  384. "if",
  385. "ignore",
  386. "ignore_server_ids",
  387. "in",
  388. "index",
  389. "infile",
  390. "inner",
  391. "inout",
  392. "insensitive",
  393. "insert",
  394. "int",
  395. "int1",
  396. "int2",
  397. "int3",
  398. "int4",
  399. "int8",
  400. "integer",
  401. "interval",
  402. "into",
  403. "io_after_gtids",
  404. "io_before_gtids",
  405. "is",
  406. "iterate",
  407. "join",
  408. "json_table",
  409. "key",
  410. "keys",
  411. "kill",
  412. "lag",
  413. "last_value",
  414. "lateral",
  415. "lead",
  416. "leading",
  417. "leave",
  418. "left",
  419. "like",
  420. "limit",
  421. "linear",
  422. "lines",
  423. "load",
  424. "localtime",
  425. "localtimestamp",
  426. "lock",
  427. "long",
  428. "longblob",
  429. "longtext",
  430. "loop",
  431. "low_priority",
  432. "master_bind",
  433. "master_heartbeat_period",
  434. "master_ssl_verify_server_cert",
  435. "match",
  436. "maxvalue",
  437. "mediumblob",
  438. "mediumint",
  439. "mediumtext",
  440. "member",
  441. "middleint",
  442. "minute_microsecond",
  443. "minute_second",
  444. "mod",
  445. "modifies",
  446. "natural",
  447. "no_write_to_binlog",
  448. "not",
  449. "nth_value",
  450. "ntile",
  451. "null",
  452. "numeric",
  453. "of",
  454. "on",
  455. "optimize",
  456. "optimizer_costs",
  457. "option",
  458. "optionally",
  459. "or",
  460. "order",
  461. "out",
  462. "outer",
  463. "outfile",
  464. "over",
  465. "parse_gcol_expr",
  466. "partition",
  467. "percent_rank",
  468. "persist",
  469. "persist_only",
  470. "precision",
  471. "primary",
  472. "procedure",
  473. "purge",
  474. "range",
  475. "rank",
  476. "read",
  477. "read_write",
  478. "reads",
  479. "real",
  480. "recursive",
  481. "references",
  482. "regexp",
  483. "release",
  484. "rename",
  485. "repeat",
  486. "replace",
  487. "require",
  488. "resignal",
  489. "restrict",
  490. "return",
  491. "revoke",
  492. "right",
  493. "rlike",
  494. "role",
  495. "row",
  496. "row_number",
  497. "rows",
  498. "schema",
  499. "schemas",
  500. "second_microsecond",
  501. "select",
  502. "sensitive",
  503. "separator",
  504. "set",
  505. "show",
  506. "signal",
  507. "slow",
  508. "smallint",
  509. "spatial",
  510. "specific",
  511. "sql",
  512. "sql_after_gtids",
  513. "sql_before_gtids",
  514. "sql_big_result",
  515. "sql_calc_found_rows",
  516. "sql_small_result",
  517. "sqlexception",
  518. "sqlstate",
  519. "sqlwarning",
  520. "ssl",
  521. "starting",
  522. "stored",
  523. "straight_join",
  524. "system",
  525. "table",
  526. "terminated",
  527. "then",
  528. "tinyblob",
  529. "tinyint",
  530. "tinytext",
  531. "to",
  532. "trailing",
  533. "trigger",
  534. "true",
  535. "undo",
  536. "union",
  537. "unique",
  538. "unlock",
  539. "unsigned",
  540. "update",
  541. "usage",
  542. "use",
  543. "using",
  544. "utc_date",
  545. "utc_time",
  546. "utc_timestamp",
  547. "values",
  548. "varbinary",
  549. "varchar",
  550. "varcharacter",
  551. "varying",
  552. "virtual",
  553. "when",
  554. "where",
  555. "while",
  556. "window",
  557. "with",
  558. "write",
  559. "xor",
  560. "year_month",
  561. "zerofill",
  562. }