#[repr(u32)]pub enum Suggestion {
Variable = 0,
CatalogName = 1,
SchemaName = 2,
TableName = 3,
ColumnName = 4,
ScalarFunctionName = 5,
TableFunctionName = 6,
TypeName = 7,
PragmaName = 8,
SettingName = 9,
FileName = 10,
}Expand description
What an identifier matcher was built to suggest.
Kept rather than reduced to the two answers it implies, because upstream derives both from it
and keeping the derivation in one place is how the two stay comparable. identifier_matcher.hpp
is the source.
Variants§
Variable = 0
CatalogName = 1
SchemaName = 2
TableName = 3
ColumnName = 4
ScalarFunctionName = 5
TableFunctionName = 6
TypeName = 7
PragmaName = 8
SettingName = 9
FileName = 10
Implementations§
Source§impl Suggestion
impl Suggestion
Sourcepub const fn allowed_class(self) -> u8
pub const fn allowed_class(self) -> u8
Which keyword class may be used as a bare word here, on top of unreserved.
Type name positions allow the type name class, both function name positions allow the
combined type and function class, and everything else allows the column name class. That
TypeFuncKeyword <- TypeNameKeyword / FuncNameKeyword is a rule in the grammar and also a
category in the matcher is not a coincidence, it is the same union written once.
ParsedGrammarKeywordHelper’s constructor holds a table of five rule names against five
keyword sets, and the entry for typefunc_keyword_map names that rule, which it then walks
through its references to collect the words. So the category is not a sixth list somebody
has to keep in step with the other five, it is what that one line of the grammar says.
Sourcepub const fn supports_string_literal(self) -> bool
pub const fn supports_string_literal(self) -> bool
Whether a single quoted string is accepted where this name is expected.
Two positions only. FROM 'file.parquet' is the reason, and SELECT 'x' FROM t staying a
string literal rather than becoming a column reference is the reason it is only two.
Trait Implementations§
Source§impl Clone for Suggestion
impl Clone for Suggestion
Source§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more