Module keywords

Source
Expand description

This module defines

  1. a list of constants for every keyword that can appear in crate::tokenizer::Word::keyword:

    pub const KEYWORD = “KEYWORD”

  2. an ALL_KEYWORDS array with every keyword in it This is not a list of reserved keywords: some of these can be parsed as identifiers if the parser decides so. This means that new keywords can be added here without affecting the parse result.

    As a matter of fact, most of these keywords are not used at all and could be removed.

  3. a RESERVED_FOR_TABLE_ALIAS array with keywords reserved in a “table alias” context.

Macros§

define_keywords 🔒
Expands to a list of kw_def!() invocations for each keyword and defines an ALL_KEYWORDS array of the defined constants.
kw_def 🔒
Defines a string constant for a single keyword: kw_def!(SELECT); expands to pub const SELECT = "SELECT";

Enums§

Keyword

Constants§

ABORT
ABS
ACTION
ADAPTIVE
ADD
AGGREGATE
ALL
ALLOCATE
ALL_KEYWORDS
ALL_KEYWORDS_INDEX
ALTER
ANALYSE
ANALYZE
AND
ANY
APPEND
ARE
ARRAY
ARRAY_AGG
ARRAY_MAX_CARDINALITY
AS
ASC
ASENSITIVE
ASOF
ASYMMETRIC
AT
ATOMIC
AUTHORIZATION
AUTO
AVG
BASE64
BEGIN
BEGIN_FRAME
BEGIN_PARTITION
BETWEEN
BIGINT
BINARY
BIT_LENGTH
BLOB
BOOL
BOOLEAN
BOTH
BY
BYTEA
CACHE
CALL
CALLED
CANCEL
CARDINALITY
CASCADE
CASCADED
CASE
CAST
CEIL
CEILING
CHAIN
CHAR
CHARACTER
CHARACTERISTICS
CHARACTER_LENGTH
CHAR_LENGTH
CHECK
CLOB
CLOSE
CLUSTER
COALESCE
COLLATE
COLLATION
COLLECT
COLUMN
COLUMNS
COMMENT
COMMIT
COMMITTED
CONCURRENTLY
CONDITION
CONFLICT
CONFLUENT
CONNECT
CONNECTION
CONNECTIONS
CONNECTOR
CONSTRAINT
CONTAINS
CONVERT
COPY
CORR
CORRESPONDING
COUNT
COVAR_POP
COVAR_SAMP
CREATE
CREATEDB
CREATEUSER
CROSS
CUBE
CUME_DIST
CURRENT
CURRENT_CATALOG
CURRENT_DATE
CURRENT_DEFAULT_TRANSFORM_GROUP
CURRENT_PATH
CURRENT_ROLE
CURRENT_ROW
CURRENT_SCHEMA
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_TRANSFORM_GROUP_FOR_TYPE
CURRENT_USER
CURSOR
CURSORS
CYCLE
DATA
DATABASE
DATABASES
DATE
DAY
DEALLOCATE
DEC
DECIMAL
DECLARE
DEFAULT
DEFERRABLE
DEFERRED
DELETE
DELIMITED
DENSE_RANK
DEREF
DESC
DESCRIBE
DETERMINISTIC
DIRECTORY
DISCARD
DISCONNECT
DISTINCT
DISTRIBUTED
DISTSQL
DO
DOT
DOUBLE
DROP
DURATION_SECS
DYNAMIC
EACH
ELEMENT
ELSE
EMIT
ENCODE
ENCRYPTED
END
END_EXEC
END_FRAME
END_PARTITION
ENGINE
EQUALS
ERROR
ESCAPE
EVENT
EVERY
EXCEPT
EXCLUDE
EXEC
EXECUTE
EXISTS
EXP
EXPLAIN
EXTERNAL
EXTRACT
FALSE
FETCH
FILE
FILTER
FIRST
FIRST_VALUE
FLOAT
FLOOR
FLUSH
FOLLOWING
FOR
FOREIGN
FORMAT
FRAME_ROW
FREE
FREEZE
FROM
FULL
FUNCTION
FUNCTIONS
FUSION
GAP
GET
GLOBAL
GRANT
GRANTED
GROUP
GROUPING
GROUPS
HAVING
HEADER
HOLD
HOUR
IDENTITY
IF
IGNORE
ILIKE
IMMEDIATELY
IMMUTABLE
IN
INCLUDE
INDEX
INDEXES
INDICATOR
INITIALLY
INNER
INOUT
INSENSITIVE
INSERT
INT
INTEGER
INTERNAL
INTERSECT
INTERSECTION
INTERVAL
INTO
IS
ISNULL
ISOLATION
JOB
JOBS
JOIN
JSON
KEY
KEYS
KILL
LANGUAGE
LARGE
LAST
LATERAL
LEADING
LEFT
LEVEL
LIKE
LIMIT
LINK
LN
LOCAL
LOCALTIME
LOCALTIMESTAMP
LOCATION
LOGICAL
LOGIN
LOWER
MAP
MATCH
MATERIALIZED
MAX
MEMBER
MERGE
MESSAGE
METHOD
MIN
MINUTE
MOD
MODIFIES
MODULE
MONTH
MULTISET
NATIONAL
NATIVE
NATURAL
NCHAR
NCLOB
NEW
NEXT
NO
NOCREATEDB
NOCREATEUSER
NOLOGIN
NONE
NORMALIZE
NOSCAN
NOSUPERUSER
NOT
NOTHING
NOTNULL
NTH_VALUE
NTILE
NULL
NULLIF
NULLS
NUMERIC
OAUTH
OBJECT
OCCURRENCES_REGEX
OCTET_LENGTH
OF
OFFSET
OLD
ON
ONLY
OPEN
OPERATOR
OPTION
OR
ORDER
ORDINALITY
OTHERS
OUT
OUTER
OUTPUTFORMAT
OVER
OVERLAPS
OVERLAY
OVERWRITE
OWNER
PARALLELISM
PARAMETER
PARQUET
PARTITION
PARTITIONED
PARTITIONS
PASSWORD
PERCENT
PERCENTILE_CONT
PERCENTILE_DISC
PERCENT_RANK
PERIOD
PHYSICAL
PLACING
PORTION
POSITION
POSITION_REGEX
POWER
PRECEDES
PRECEDING
PRECISION
PREPARE
PRIMARY
PRIVILEGES
PROCEDURE
PROCESSLIST
PURGE
RANGE
RANK
RCFILE
READ
READS
REAL
RECOVER
RECURSIVE
REF
REFERENCES
REFERENCING
REFRESH
REGISTRY
REGR_AVGX
REGR_AVGY
REGR_COUNT
REGR_INTERCEPT
REGR_R2
REGR_SLOPE
REGR_SXX
REGR_SXY
REGR_SYY
RELEASE
RENAME
REPAIR
REPEATABLE
REPLACE
RESERVED_FOR_COLUMN_ALIAS
Can’t be used as a column alias, so that SELECT <expr> alias can be parsed unambiguously without looking ahead.
RESERVED_FOR_COLUMN_OR_TABLE_NAME
Can’t be used as a column or table name in PostgreSQL.
RESERVED_FOR_TABLE_ALIAS
These keywords can’t be used as a table alias, so that FROM table_name alias can be parsed unambiguously without looking ahead.
RESET
RESOURCE_GROUP
RESTRICT
RESULT
RETURN
RETURNING
RETURNS
REVOKE
RIGHT
ROLLBACK
ROLLUP
ROW
ROWID
ROWS
ROW_NUMBER
RUNTIME
SAVEPOINT
SCALAR
SCHEMA
SCHEMAS
SCOPE
SCROLL
SEARCH
SECOND
SECRET
SECRETS
SELECT
SENSITIVE
SEQUENCE
SEQUENCEFILE
SEQUENCES
SERDE
SERIALIZABLE
SESSION
SESSION_USER
SET
SETS
SHOW
SIMILAR
SINCE
SINK
SINKS
SMALLINT
SNAPSHOT
SOME
SORT
SOURCE
SOURCES
SPECIFIC
SPECIFICTYPE
SQL
SQLEXCEPTION
SQLSTATE
SQLWARNING
SQRT
STABLE
START
STATIC
STATISTICS
STDDEV_POP
STDDEV_SAMP
STDIN
STORED
STRING
STRUCT
SUBMULTISET
SUBSCRIPTION
SUBSCRIPTIONS
SUBSTRING
SUBSTRING_REGEX
SUCCEEDS
SUM
SUPERUSER
SWAP
SYMMETRIC
SYNC
SYSTEM
SYSTEM_TIME
SYSTEM_USER
SYSTEM_VERSION
TABLE
TABLES
TABLESAMPLE
TBLPROPERTIES
TEMP
TEMPORARY
TEXT
TEXTFILE
THEN
TIES
TIME
TIMESTAMP
TIMEZONE_HOUR
TIMEZONE_MINUTE
TINYINT
TO
TOP
TRACE
TRAILING
TRANSACTION
TRANSLATE
TRANSLATE_REGEX
TRANSLATION
TREAT
TRIGGER
TRIM
TRIM_ARRAY
TRUE
TRUNCATE
TRY_CAST
TYPE
UESCAPE
UNBOUNDED
UNCOMMITTED
UNION
UNIQUE
UNKNOWN
UNNEST
UPDATE
UPPER
USAGE
USE
USER
USING
UUID
VALIDATE
VALUE
VALUES
VALUE_OF
VARBINARY
VARCHAR
VARIADIC
VARYING
VAR_POP
VAR_SAMP
VERBOSE
VERSION
VERSIONING
VIEW
VIEWS
VIRTUAL
VOLATILE
WAIT
WATERMARK
WHEN
WHENEVER
WHERE
WIDTH_BUCKET
WINDOW
WITH
WITHIN
WITHOUT
WORK
WRITE
XML
XOR
YAML
YEAR
ZONE