Struct datafusion::logical_expr::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() -> ParserOptions
pub fn new() -> ParserOptions
Create a new ParserOptions
sourcepub 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
sourcepub 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§
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§fn default() -> ParserOptions
fn default() -> ParserOptions
Returns the “default value” for a type. Read more
source§impl PartialEq for ParserOptions
impl PartialEq for ParserOptions
impl Eq for ParserOptions
impl StructuralPartialEq for ParserOptions
Auto Trait Implementations§
impl Freeze for ParserOptions
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more