Expand description
This module defines
-
a list of constants for every keyword that can appear in crate::tokenizer::Word::keyword: pub const KEYWORD = “KEYWORD”
-
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.
-
a
RESERVED_FOR_TABLE_ALIAS
array with keywords reserved in a “table alias” context.
Macros§
- 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 topub const SELECT = "SELECT";
Enums§
Constants§
- Can’t be used as a column alias, so that
SELECT <expr> alias
can be parsed unambiguously without looking ahead. - Can’t be used as a column or table name in PostgreSQL.
- These keywords can’t be used as a table alias, so that
FROM table_name alias
can be parsed unambiguously without looking ahead.