Struct gluesql::core::sqlparser::parser::ParserOptions
pub struct ParserOptions {
pub trailing_commas: bool,
pub unescape: bool,
}Expand description
Options that control how the Parser parses SQL text
Fields§
§trailing_commas: bool§unescape: boolControls how literal values are unescaped. See
Tokenizer::with_unescape for more details.
Implementations§
§impl ParserOptions
impl ParserOptions
pub fn new() -> ParserOptions
pub fn new() -> ParserOptions
Create a new ParserOptions
pub fn with_trailing_commas(self, trailing_commas: bool) -> ParserOptions
pub fn with_trailing_commas(self, trailing_commas: bool) -> ParserOptions
Set if trailing commas are allowed.
If this option is false (the default), the following SQL will
not parse. If the option is true, the SQL will parse.
SELECT
foo,
bar,
FROM baz
pub fn with_unescape(self, unescape: bool) -> ParserOptions
pub fn with_unescape(self, unescape: bool) -> ParserOptions
Set if literal values are unescaped. Defaults to true. See
Tokenizer::with_unescape for more details.
Trait Implementations§
§impl Clone for ParserOptions
impl Clone for ParserOptions
§fn clone(&self) -> ParserOptions
fn clone(&self) -> ParserOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ParserOptions
impl Debug for ParserOptions
§impl Default for ParserOptions
impl Default for ParserOptions
§fn default() -> ParserOptions
fn default() -> ParserOptions
Returns the “default value” for a type. Read more
§impl PartialEq for ParserOptions
impl PartialEq for ParserOptions
§fn eq(&self, other: &ParserOptions) -> bool
fn eq(&self, other: &ParserOptions) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ParserOptions
impl StructuralEq for ParserOptions
impl StructuralPartialEq for ParserOptions
Auto Trait Implementations§
impl RefUnwindSafe for ParserOptions
impl Send for ParserOptions
impl Sync for ParserOptions
impl Unpin for ParserOptions
impl UnwindSafe for ParserOptions
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.