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
Fields§
§value: String
The value of the token, without the enclosing quotes, and with the escape sequences (if any) processed (TODO: escapes are not handled)
quote_style: Option<char>
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])
keyword: Keyword
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
Implementations§
Trait Implementations§
source§impl Ord for Word
impl Ord for Word
source§impl PartialEq for Word
impl PartialEq for Word
source§impl PartialOrd for Word
impl PartialOrd for Word
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Word
impl StructuralEq for Word
impl StructuralPartialEq for Word
Auto Trait Implementations§
impl RefUnwindSafe for Word
impl Send for Word
impl Sync for Word
impl Unpin for Word
impl UnwindSafe for Word
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more