pub struct Split {
pub statements: Vec<String>,
pub remainder: String,
pub remainder_balanced: bool,
pub in_literal: bool,
pub remainder_has_code: bool,
pub metas: Vec<MetaCommand>,
pub vars: Vec<(String, String)>,
pub delimiter: Option<String>,
pub reconnect: bool,
}Expand description
Result of splitting accumulated input.
Fields§
§statements: Vec<String>Complete statements, whitespace-normalised, comments removed.
remainder: StringRaw text after the last complete statement (meta-commands removed).
remainder_balanced: boolThe remainder has no open quote/comment and balanced brackets.
in_literal: boolThe remainder ends inside a string, quoted identifier or comment.
remainder_has_code: boolThe remainder holds code (not only whitespace and comments) or ends inside a string / comment.
metas: Vec<MetaCommand>Meta-commands that run files / shell commands / unseen SQL.
vars: Vec<(String, String)>psql \set name value assignments, in order.
delimiter: Option<String>New statement delimiter (mysql \d / delimiter).
reconnect: boolThe client opens a new connection (psql \c, mysql \r): the
temporary tables of the old one are gone.
Trait Implementations§
impl Eq for Split
impl StructuralPartialEq for Split
Auto Trait Implementations§
impl Forget for Split
impl Freeze for Split
impl Move for Split
impl RefUnwindSafe for Split
impl Send for Split
impl Sync for Split
impl Unpin for Split
impl UnsafeUnpin for Split
impl UnwindSafe for Split
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§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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