github.com/matrixorigin/matrixone@v1.2.0/pkg/sql/parsers/dialect/mysql/keywords.go (about) 1 // Copyright 2021 Matrix Origin 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package mysql 16 17 var keywords map[string]int 18 19 func init() { 20 keywords = map[string]int{ 21 "accessible": UNUSED, 22 "account": ACCOUNT, 23 "accounts": ACCOUNTS, 24 "add": ADD, 25 "modify": MODIFY, 26 "action": ACTION, 27 "against": AGAINST, 28 "all": ALL, 29 "alter": ALTER, 30 "algorithm": ALGORITHM, 31 "analyze": ANALYZE, 32 "and": AND, 33 "any": ANY, 34 "as": AS, 35 "asc": ASC, 36 "ascii": ASCII, 37 "asensitive": UNUSED, 38 "auto_increment": AUTO_INCREMENT, 39 "autoextend_size": AUTOEXTEND_SIZE, 40 "auto_random": AUTO_RANDOM, 41 "avg_row_length": AVG_ROW_LENGTH, 42 "avg": AVG, 43 "bsi": BSI, 44 "before": UNUSED, 45 "begin": BEGIN, 46 "between": BETWEEN, 47 "bigint": BIGINT, 48 "bindings": BINDINGS, 49 "binary": BINARY, 50 "_binary": UNDERSCORE_BINARY, 51 "bit": BIT, 52 "bit_cast": BIT_CAST, 53 "blob": BLOB, 54 "bool": BOOL, 55 "boolean": BOOLEAN, 56 "both": BOTH, 57 "by": BY, 58 "btree": BTREE, 59 "ivfflat": IVFFLAT, 60 "bit_or": BIT_OR, 61 "bit_and": BIT_AND, 62 "call": CALL, 63 "cancel": CANCEL, 64 "cascade": CASCADE, 65 "case": CASE, 66 "cast": CAST, 67 "serial_extract": SERIAL_EXTRACT, 68 "change": CHANGE, 69 "char": CHAR, 70 "character": CHARACTER, 71 "charset": CHARSET, 72 "check": CHECK, 73 "checksum": CHECKSUM, 74 "coalesce": COALESCE, 75 "compressed": COMPRESSED, 76 "compression": COMPRESSION, 77 "collate": COLLATE, 78 "collation": COLLATION, 79 "column": COLUMN, 80 "columns": COLUMNS, 81 "column_format": COLUMN_FORMAT, 82 "engine_attribute": ENGINE_ATTRIBUTE, 83 "secondary_engine_attribute": SECONDARY_ENGINE_ATTRIBUTE, 84 "insert_method": INSERT_METHOD, 85 "comment": COMMENT_KEYWORD, 86 "committed": COMMITTED, 87 "commit": COMMIT, 88 "compact": COMPACT, 89 "condition": UNUSED, 90 "constraint": CONSTRAINT, 91 "consistent": CONSISTENT, 92 "continue": UNUSED, 93 "connection": CONNECTION, 94 "connect": CONNECT, 95 "convert": CONVERT, 96 "config": CONFIG, 97 "connector": CONNECTOR, 98 "connectors": CONNECTORS, 99 "cipher": CIPHER, 100 "chain": CHAIN, 101 "client": CLIENT, 102 "san": SAN, 103 "strict": STRICT, 104 "substr": SUBSTR, 105 "substring": SUBSTRING, 106 "subject": SUBJECT, 107 "subpartition": SUBPARTITION, 108 "subpartitions": SUBPARTITIONS, 109 "snapshot": SNAPSHOT, 110 "snapshots": SNAPSHOTS, 111 "sysdate": SYSDATE, 112 "create": CREATE, 113 "cluster": CLUSTER, 114 "cross": CROSS, 115 "current_date": CURRENT_DATE, 116 "current_time": CURRENT_TIME, 117 "current_timestamp": CURRENT_TIMESTAMP, 118 "current_user": CURRENT_USER, 119 "current_role": CURRENT_ROLE, 120 "curtime": CURTIME, 121 "cursor": UNUSED, 122 "daemon": DAEMON, 123 "database": DATABASE, 124 "databases": DATABASES, 125 "day": DAY, 126 "date": DATE, 127 "data": DATA, 128 "datetime": DATETIME, 129 "dec": UNUSED, 130 "decimal": DECIMAL, 131 "declare": DECLARE, 132 "default": DEFAULT, 133 "instant": INSTANT, 134 "inplace": INPLACE, 135 "copy": COPY, 136 "undefined": UNDEFINED, 137 "merge": MERGE, 138 "temptable": TEMPTABLE, 139 "definer": DEFINER, 140 "invoker": INVOKER, 141 "security": SECURITY, 142 "cascaded": CASCADED, 143 "disable": DISABLE, 144 "enable": ENABLE, 145 "delayed": DELAYED, 146 "delete": DELETE, 147 "desc": DESC, 148 "describe": DESCRIBE, 149 "deterministic": UNUSED, 150 "distinct": DISTINCT, 151 "distinctrow": UNUSED, 152 "disk": DISK, 153 "div": DIV, 154 "directory": DIRECTORY, 155 "double": DOUBLE, 156 "do": DO, 157 "drop": DROP, 158 "dynamic": DYNAMIC, 159 "duplicate": DUPLICATE, 160 "delay_key_write": DELAY_KEY_WRITE, 161 "drainer": DRAINER, 162 "each": UNUSED, 163 "else": ELSE, 164 "elseif": ELSEIF, 165 "enclosed": ENCLOSED, 166 "encryption": ENCRYPTION, 167 "engine": ENGINE, 168 "end": END, 169 "enum": ENUM, 170 "enforced": ENFORCED, 171 "escape": ESCAPE, 172 "escaped": ESCAPED, 173 "exists": EXISTS, 174 "exit": UNUSED, 175 "explain": EXPLAIN, 176 "expansion": EXPANSION, 177 "extended": EXTENDED, 178 "expire": EXPIRE, 179 "except": EXCEPT, 180 "execute": EXECUTE, 181 "errors": ERRORS, 182 "event": EVENT, 183 "events": EVENTS, 184 "engines": ENGINES, 185 "false": FALSE, 186 "fetch": UNUSED, 187 "first": FIRST, 188 "after": AFTER, 189 "float": FLOAT_TYPE, 190 "float4": UNUSED, 191 "float8": UNUSED, 192 "for": FOR, 193 "force": FORCE, 194 "foreign": FOREIGN, 195 "format": FORMAT, 196 "from": FROM, 197 "full": FULL, 198 "fulltext": FULLTEXT, 199 "function": FUNCTION, 200 "fields": FIELDS, 201 "file": FILE, 202 "fixed": FIXED, 203 "generated": UNUSED, 204 "geometry": GEOMETRY, 205 "geometrycollection": GEOMETRYCOLLECTION, 206 "get": UNUSED, 207 "global": GLOBAL, 208 "grant": GRANT, 209 "grants": GRANTS, 210 "group": GROUP, 211 "group_concat": GROUP_CONCAT, 212 "having": HAVING, 213 "hash": HASH, 214 "high_priority": HIGH_PRIORITY, 215 "hour": HOUR, 216 "identified": IDENTIFIED, 217 "if": IF, 218 "ignore": IGNORE, 219 "in": IN, 220 "index": INDEX, 221 "indexes": INDEXES, 222 "inline": INLINE, 223 "infile": INFILE, 224 "inout": INOUT, 225 "inner": INNER, 226 "insensitive": UNUSED, 227 "insert": INSERT, 228 "int": INT, 229 "int1": INT1, 230 "int2": INT2, 231 "int3": INT3, 232 "int4": INT4, 233 "int8": INT8, 234 "s3option": S3OPTION, 235 "stageoption": STAGEOPTION, 236 "integer": INTEGER, 237 "interval": INTERVAL, 238 "into": INTO, 239 "invisible": INVISIBLE, 240 "io_after_gtids": UNUSED, 241 "is": IS, 242 "issuer": ISSUER, 243 "isolation": ISOLATION, 244 "iterate": ITERATE, 245 "join": JOIN, 246 "json": JSON, 247 "jsontype": JSONTYPE, 248 "uuid": UUID, 249 "key": KEY, 250 "keys": KEYS, 251 "key_block_size": KEY_BLOCK_SIZE, 252 "kill": KILL, 253 "language": LANGUAGE, 254 "last": LAST, 255 "leading": LEADING, 256 "leave": LEAVE, 257 "left": LEFT, 258 "less": LESS, 259 "level": LEVEL, 260 "like": LIKE, 261 "ilike": ILIKE, 262 "list": LIST, 263 "lists": LISTS, 264 "op_type": OP_TYPE, 265 "reindex": REINDEX, 266 "limit": LIMIT, 267 "linear": LINEAR, 268 "lines": LINES, 269 "rows": ROWS, 270 "linestring": LINESTRING, 271 "load": LOAD, 272 "import": IMPORT, 273 "discard": DISCARD, 274 "localtime": LOCALTIME, 275 "localtimestamp": LOCALTIMESTAMP, 276 "lock": LOCK, 277 "locks": LOCKS, 278 "long": UNUSED, 279 "longblob": LONGBLOB, 280 "longtext": LONGTEXT, 281 "loop": LOOP, 282 "low_priority": LOW_PRIORITY, 283 "local": LOCAL, 284 "master_bind": UNUSED, 285 "match": MATCH, 286 "maxvalue": MAXVALUE, 287 "manage": MANAGE, 288 "mediumblob": MEDIUMBLOB, 289 "mediumint": MEDIUMINT, 290 "mediumtext": MEDIUMTEXT, 291 "middleint": UNUSED, 292 "minute": MINUTE, 293 "microsecond": MICROSECOND, 294 "mod": MOD, 295 "month": MONTH, 296 "mode": MODE, 297 "memory": MEMORY, 298 "modifies": UNUSED, 299 "multilinestring": MULTILINESTRING, 300 "multipoint": MULTIPOINT, 301 "multipolygon": MULTIPOLYGON, 302 "max_queries_per_hour": MAX_QUERIES_PER_HOUR, 303 "max_update_per_hour": MAX_UPDATES_PER_HOUR, 304 "max_connections_per_hour": MAX_CONNECTIONS_PER_HOUR, 305 "max_user_connections": MAX_USER_CONNECTIONS, 306 "max_rows": MAX_ROWS, 307 "min_rows": MIN_ROWS, 308 "names": NAMES, 309 "natural": NATURAL, 310 "nchar": NCHAR, 311 "next": NEXT, 312 "never": NEVER, 313 "not": NOT, 314 "no": NO, 315 "node": NODE, 316 "no_write_to_binlog": UNUSED, 317 "null": NULL, 318 "nulls": NULLS, 319 "numeric": NUMERIC, 320 "none": NONE, 321 "shared": SHARED, 322 "exclusive": EXCLUSIVE, 323 "offset": OFFSET, 324 "on": ON, 325 "only": ONLY, 326 "optimize": OPTIMIZE, 327 "optimizer_costs": UNUSED, 328 "option": OPTION, 329 "optionally": OPTIONALLY, 330 "open": OPEN, 331 "or": OR, 332 "order": ORDER, 333 "out": OUT, 334 "outer": OUTER, 335 "over": OVER, 336 "outfile": OUTFILE, 337 "ownership": OWNERSHIP, 338 "header": HEADER, 339 "headers": HEADERS, 340 "parallel": PARALLEL, 341 "max_file_size": MAX_FILE_SIZE, 342 "force_quote": FORCE_QUOTE, 343 "external": EXTERNAL, 344 "url": URL, 345 "pause": PAUSE, 346 "parser": PARSER, 347 "partition": PARTITION, 348 "partitions": PARTITIONS, 349 "partial": PARTIAL, 350 "password": PASSWORD, 351 "pack_keys": PACK_KEYS, 352 "point": POINT, 353 "polygon": POLYGON, 354 "precision": UNUSED, 355 "primary": PRIMARY, 356 "processlist": PROCESSLIST, 357 "procedure": PROCEDURE, 358 "proxy": PROXY, 359 "properties": PROPERTIES, 360 "privileges": PRIVILEGES, 361 "prev": PREV, 362 "plugins": PLUGINS, 363 "persist": PERSIST, 364 "query": QUERY, 365 "quarter": QUARTER, 366 "quick": QUICK, 367 "range": RANGE, 368 "rank": RANK, 369 "read": READ, 370 "reads": UNUSED, 371 "redundant": REDUNDANT, 372 "read_write": UNUSED, 373 "real": REAL, 374 "references": REFERENCES, 375 "regexp": REGEXP, 376 "release": RELEASE, 377 "rename": RENAME, 378 "reorganize": REORGANIZE, 379 "repair": REPAIR, 380 "repeat": REPEAT, 381 "repeatable": REPEATABLE, 382 "replace": REPLACE, 383 "replication": REPLICATION, 384 "require": REQUIRE, 385 "resignal": UNUSED, 386 "restrict": RESTRICT, 387 "resume": RESUME, 388 "recursive": RECURSIVE, 389 "return": UNUSED, 390 "revoke": REVOKE, 391 "reverse": REVERSE, 392 "reload": RELOAD, 393 "right": RIGHT, 394 "rlike": REGEXP, 395 "rollback": ROLLBACK, 396 "role": ROLE, 397 "routine": ROUTINE, 398 "row": ROW, 399 "row_format": ROW_FORMAT, 400 "row_count": ROW_COUNT, 401 "row_number": ROW_NUMBER, 402 "rtree": RTREE, 403 "schema": SCHEMA, 404 "schemas": SCHEMAS, 405 "second": SECOND, 406 "select": SELECT, 407 "sensitive": UNUSED, 408 "separator": SEPARATOR, 409 "serializable": SERIALIZABLE, 410 "session": SESSION, 411 "set": SET, 412 "share": SHARE, 413 "show": SHOW, 414 "shutdown": SHUTDOWN, 415 "signal": UNUSED, 416 "signed": SIGNED, 417 "simple": SIMPLE, 418 "smallint": SMALLINT, 419 "spatial": SPATIAL, 420 "specific": UNUSED, 421 "sql": SQL, 422 "sqlexception": UNUSED, 423 "sqlstate": UNUSED, 424 "sqlwarning": UNUSED, 425 "sql_big_result": SQL_BIG_RESULT, 426 "sql_cache": SQL_CACHE, 427 "sql_calc_found_rows": UNUSED, 428 "sql_no_cache": SQL_NO_CACHE, 429 "sql_small_result": SQL_SMALL_RESULT, 430 "sql_buffer_result": SQL_BUFFER_RESULT, 431 "ssl": SSL, 432 "slave": SLAVE, 433 "sliding": SLIDING, 434 "start": START, 435 "starting": STARTING, 436 "status": STATUS, 437 "stats_auto_recalc": STATS_AUTO_RECALC, 438 "stats_persistent": STATS_PERSISTENT, 439 "stats_sample_pages": STATS_SAMPLE_PAGES, 440 "stored": UNUSED, 441 "storage": STORAGE, 442 "straight_join": STRAIGHT_JOIN, 443 "stream": STREAM, 444 "source": SOURCE, 445 "super": SUPER, 446 "table": TABLE, 447 "tables": TABLES, 448 "tablespace": TABLESPACE, 449 "terminated": TERMINATED, 450 "task": TASK, 451 "text": TEXT, 452 "temporary": TEMPORARY, 453 "than": THAN, 454 "then": THEN, 455 "time": TIME, 456 "timestamp": TIMESTAMP, 457 "timestampdiff": TIMESTAMPDIFF, 458 "tinyblob": TINYBLOB, 459 "tinyint": TINYINT, 460 "tinytext": TINYTEXT, 461 "to": TO, 462 "trailing": TRAILING, 463 "transaction": TRANSACTION, 464 "trigger": TRIGGER, 465 "triggers": TRIGGERS, 466 "true": TRUE, 467 "truncate": TRUNCATE, 468 "uncommitted": UNCOMMITTED, 469 "undo": UNUSED, 470 "unknown": UNKNOWN, 471 "union": UNION, 472 "unique": UNIQUE, 473 "unlock": UNLOCK, 474 "unsigned": UNSIGNED, 475 "update": UPDATE, 476 "usage": USAGE, 477 "use": USE, 478 "user": USER, 479 "using": USING, 480 "utc_date": UTC_DATE, 481 "utc_time": UTC_TIME, 482 "utc_timestamp": UTC_TIMESTAMP, 483 "values": VALUES, 484 "value": VALUE, 485 "variables": VARIABLES, 486 "varbinary": VARBINARY, 487 "varchar": VARCHAR, 488 "varcharacter": UNUSED, 489 "varying": UNUSED, 490 "virtual": UNUSED, 491 "view": VIEW, 492 "visible": VISIBLE, 493 "week": WEEK, 494 "when": WHEN, 495 "where": WHERE, 496 "while": WHILE, 497 "with": WITH, 498 "without": WITHOUT, 499 "validation": VALIDATION, 500 "write": WRITE, 501 "warnings": WARNINGS, 502 "work": WORK, 503 "xor": XOR, 504 "x509": X509, 505 "year": YEAR, 506 "zerofill": ZEROFILL, 507 "zonemap": ZONEMAP, 508 "adddate": ADDDATE, 509 "count": COUNT, 510 "approx_count": APPROX_COUNT, 511 "approx_count_distinct": APPROX_COUNT_DISTINCT, 512 "approx_percentile": APPROX_PERCENTILE, 513 "curdate": CURDATE, 514 "date_add": DATE_ADD, 515 "date_sub": DATE_SUB, 516 "extract": EXTRACT, 517 "max": MAX, 518 "median": MEDIAN, 519 "mid": MID, 520 "now": NOW, 521 "position": POSITION, 522 "pump": PUMP, 523 "profiles": PROFILES, 524 "session_user": SESSION_USER, 525 "std": STD, 526 "stddev": STDDEV, 527 "stddev_pop": STDDEV_POP, 528 "stddev_samp": STDDEV_SAMP, 529 "subdate": SUBDATE, 530 "sum": SUM, 531 "system_user": SYSTEM_USER, 532 "some": SOME, 533 "translate": TRANSLATE, 534 "trim": TRIM, 535 "variance": VARIANCE, 536 "var_pop": VAR_POP, 537 "var_samp": VAR_SAMP, 538 "type": TYPE, 539 "verbose": VERBOSE, 540 "sql_tsi_minute": SQL_TSI_MINUTE, 541 "sql_tsi_second": SQL_TSI_SECOND, 542 "sql_tsi_year": SQL_TSI_YEAR, 543 "sql_tsi_quarter": SQL_TSI_QUARTER, 544 "sql_tsi_month": SQL_TSI_MONTH, 545 "sql_tsi_week": SQL_TSI_WEEK, 546 "sql_tsi_day": SQL_TSI_DAY, 547 "sql_tsi_hour": SQL_TSI_HOUR, 548 "year_month": YEAR_MONTH, 549 "day_hour": DAY_HOUR, 550 "day_minute": DAY_MINUTE, 551 "day_second": DAY_SECOND, 552 "day_microsecond": DAY_MICROSECOND, 553 "hour_minute": HOUR_MINUTE, 554 "hour_second": HOUR_SECOND, 555 "hour_microsecond": HOUR_MICROSECOND, 556 "minute_second": MINUTE_SECOND, 557 "minute_microsecond": MINUTE_MICROSECOND, 558 "min": MIN, 559 "second_microsecond": SECOND_MICROSECOND, 560 "prepare": PREPARE, 561 "deallocate": DEALLOCATE, 562 "dense_rank": DENSE_RANK, 563 "reset": RESET, 564 "intersect": INTERSECT, 565 "minus": MINUS, 566 "admin_name": ADMIN_NAME, 567 "random": RANDOM, 568 "suspend": SUSPEND, 569 "restricted": RESTRICTED, 570 "attribute": ATTRIBUTE, 571 "history": HISTORY, 572 "reuse": REUSE, 573 "current": CURRENT, 574 "optional": OPTIONAL, 575 "failed_login_attempts": FAILED_LOGIN_ATTEMPTS, 576 "password_lock_time": PASSWORD_LOCK_TIME, 577 "unbounded": UNBOUNDED, 578 "secondary": SECONDARY, 579 "reference": REFERENCE, 580 "modump": MODUMP, 581 "low_cardinality": LOW_CARDINALITY, 582 "preceding": PRECEDING, 583 "following": FOLLOWING, 584 "fill": FILL, 585 "groups": GROUPS, 586 "table_number": TABLE_NUMBER, 587 "table_values": TABLE_VALUES, 588 "table_size": TABLE_SIZE, 589 "cluster_centers": CLUSTER_CENTERS, 590 "kmeans": KMEANS, 591 "column_number": COLUMN_NUMBER, 592 "returns": RETURNS, 593 "extension": EXTENSION, 594 "query_result": QUERY_RESULT, 595 "mysql_compatibility_mode": MYSQL_COMPATIBILITY_MODE, 596 "sequences": SEQUENCES, 597 "sequence": SEQUENCE, 598 "increment": INCREMENT, 599 "cycle": CYCLE, 600 "minvalue": MINVALUE, 601 "nextval": NEXTVAL, 602 "setval": SETVAL, 603 "currval": CURRVAL, 604 "lastval": LASTVAL, 605 "until": UNTIL, 606 "publication": PUBLICATION, 607 "subscriptions": SUBSCRIPTIONS, 608 "publications": PUBLICATIONS, 609 "roles": ROLES, 610 "backend": BACKEND, 611 "servers": SERVERS, 612 "stage": STAGE, 613 "stages": STAGES, 614 "credentials": CREDENTIALS, 615 "vecf32": VECF32, 616 "vecf64": VECF64, 617 "backup": BACKUP, 618 "filesystem": FILESYSTEM, 619 "handler": HANDLER, 620 "sample": SAMPLE, 621 "percent": PERCENT, 622 "master": MASTER, 623 "parallelism": PARALLELISM, 624 "bitmap_bit_position": BITMAP_BIT_POSITION, 625 "bitmap_bucket_number": BITMAP_BUCKET_NUMBER, 626 "bitmap_count": BITMAP_COUNT, 627 "upgrade": UPGRADE, 628 "retry": RETRY, 629 "mo_ts": MO_TS, 630 "restore": RESTORE, 631 } 632 }