Struct sqlparser::parser::ParserOptions
source · 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: bool
Controls how literal values are unescaped. See
Tokenizer::with_unescape
for more details.
Implementations§
source§impl ParserOptions
impl ParserOptions
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new ParserOptions
sourcepub fn with_trailing_commas(self, trailing_commas: bool) -> Self
pub fn with_trailing_commas(self, trailing_commas: bool) -> Self
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
sourcepub fn with_unescape(self, unescape: bool) -> Self
pub fn with_unescape(self, unescape: bool) -> Self
Set if literal values are unescaped. Defaults to true. See
Tokenizer::with_unescape
for more details.
Trait Implementations§
source§impl Clone for ParserOptions
impl Clone for ParserOptions
source§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 moresource§impl Debug for ParserOptions
impl Debug for ParserOptions
source§impl Default for ParserOptions
impl Default for ParserOptions
source§impl PartialEq for ParserOptions
impl PartialEq for ParserOptions
source§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