[−][src]Enum mysqldump_mutator::Token
SQL Token enumeration
Variants
A keyword (like SELECT) or an optionally quoted SQL identifier
Number(String)
An unsigned numeric literal
Char(char)
A character that could not be tokenized
SingleQuotedString(String)
Single quoted string: i.e: 'string'
NationalStringLiteral(String)
"National" string literal: i.e: N'string'
HexStringLiteral(String)
Hexadecimal string literal: i.e.: X'deadbeef'
Comma
Whitespace (space, tab, etc)
Equality operator =
Not Equals operator <>
(or !=
in some dialects)
Less Than operator <
Greater han operator >
Less Than Or Equals operator <=
Greater Than Or Equals operator >=
Plus operator +
Minus operator -
Multiplication operator *
Division operator /
Modulo Operator %
Left parenthesis (
Right parenthesis )
Period (used for compound identifiers or projections into nested types)
Colon :
DoubleColon ::
(used for casting in postgresql)
SemiColon ;
used as separator for COPY and payload
Backslash \
used in terminating the COPY payload with \.
Left bracket [
Right bracket ]
Ampersand &
Left brace {
Right brace }
Methods
impl Token
[src]
pub fn new(word: &str, quote_style: Option<char>) -> Self
[src]
Creates a new token. quote style is None for integers.
pub fn get_value(&self) -> String
[src]
Gets the value of the column encoded in an string. For numbers use get_number
pub fn get_number(&self) -> Option<f64>
[src]
If the token contains a number and it can be parsed, returns Some(number). None if not.
pub fn is_keyword(&self) -> bool
[src]
returns if the Token contains a keyword
pub fn get_quote_style(&self) -> Option<char>
[src]
gets the quote style. None if none or it doesn't apply
Trait Implementations
impl Clone for Token
[src]
impl Debug for Token
[src]
impl Display for Token
[src]
impl From<Token> for String
[src]
impl PartialEq<Token> for Token
[src]
impl StructuralPartialEq for Token
[src]
Auto Trait Implementations
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,