Word in sqlparser::tokenizer - Rust

pub struct Word {
    pub value: String,
    pub quote_style: Option<char>,
    pub keyword: Keyword,
}
Expand description

A keyword (like SELECT) or an optionally quoted SQL identifier

The value of the token, without the enclosing quotes, and with the escape sequences (if any) processed (TODO: escapes are not handled)

An identifier can be “quoted” (<delimited identifier> in ANSI parlance). The standard and most implementations allow using double quotes for this, but some implementations support other quoting styles as well (e.g. [MS SQL])

If the word was not quoted and it matched one of the known keywords, this will have one of the values from dialect::keywords, otherwise empty

Source§
Source

Convert a reference to this word into an Ident by cloning the value.

Use this method when you need to keep the original Word around. If you can consume the Word, prefer into_ident instead to avoid cloning.

Source

Convert this word into an Ident identifier, consuming the Word.

This avoids cloning the string value. If you need to keep the original Word, use to_ident instead.

§
§
§
§
§
§