pub struct Keyword(/* private fields */);Expand description
A SQL keyword recognised by the pinned release.
Implementations§
Source§impl Keyword
impl Keyword
Sourcepub const AUTOINCREMENT: Keyword
pub const AUTOINCREMENT: Keyword
The AUTOINCREMENT keyword.
Sourcepub const CONSTRAINT: Keyword
pub const CONSTRAINT: Keyword
The CONSTRAINT keyword.
Sourcepub const CURRENT_DATE: Keyword
pub const CURRENT_DATE: Keyword
The CURRENT_DATE keyword.
Sourcepub const CURRENT_TIME: Keyword
pub const CURRENT_TIME: Keyword
The CURRENT_TIME keyword.
Sourcepub const CURRENT_TIMESTAMP: Keyword
pub const CURRENT_TIMESTAMP: Keyword
The CURRENT_TIMESTAMP keyword.
Sourcepub const DEFERRABLE: Keyword
pub const DEFERRABLE: Keyword
The DEFERRABLE keyword.
Sourcepub const MATERIALIZED: Keyword
pub const MATERIALIZED: Keyword
The MATERIALIZED keyword.
Sourcepub const REFERENCES: Keyword
pub const REFERENCES: Keyword
The REFERENCES keyword.
Sourcepub const TRANSACTION: Keyword
pub const TRANSACTION: Keyword
The TRANSACTION keyword.
Sourcepub fn may_fall_back(self) -> bool
pub fn may_fall_back(self) -> bool
Returns whether the keyword may stand in for an identifier.
SQLite declares a fallback set so that historical schemas using
words like KEY or MATCH as column names keep working. A word
outside the set is a hard keyword in every position.
Source§impl Keyword
impl Keyword
Sourcepub const JOIN_KEYWORDS: &'static [Keyword]
pub const JOIN_KEYWORDS: &'static [Keyword]
SQLite’s JOIN_KW token class: the words that introduce a join.
They are hard keywords in the sense that matters to may_fall_back -
none appears in the %fallback declaration - and they are still legal
names, because the name production accepts the token class directly.
Both facts are true at once and the grammar states them separately.
Sourcepub fn is_join_keyword(self) -> bool
pub fn is_join_keyword(self) -> bool
Returns whether the keyword introduces a join.
Sourcepub fn may_be_name(self) -> bool
pub fn may_be_name(self) -> bool
Returns whether the keyword may be written where a name is expected.
This is SQLite’s nm ::= idj | STRING with idj ::= ID|INDEXED|JOIN_KW,
so it is the fallback set plus the seven join keywords plus INDEXED.
It is the right question for a column declaration, a table or index
name, a qualified reference, a window name, and an alias written with
AS.
It is the wrong question for the two positions that take ids - a
bare alias and a declared type name - which take only
Keyword::may_fall_back; see this module’s header for why the two
cannot be merged.