pub enum SqlStatement {
Select(SelectStatement),
Insert(InsertStatement),
Update(UpdateStatement),
Delete(DeleteStatement),
Create(CreateStatement),
Drop(DropStatement),
Alter(AlterStatement),
Error {
message: Arc<str>,
span: Range<usize>,
},
Unknown {
span: Range<usize>,
},
}Expand description
Represents a single SQL statement.
Variants§
Select(SelectStatement)
A SELECT statement.
Insert(InsertStatement)
An INSERT statement.
Update(UpdateStatement)
An UPDATE statement.
Delete(DeleteStatement)
A DELETE statement.
Create(CreateStatement)
A CREATE statement.
Drop(DropStatement)
A DROP statement.
Alter(AlterStatement)
An ALTER statement.
Error
An error occurred during parsing or building.
Unknown
An unknown or unparsed statement.
Trait Implementations§
Source§impl AsDocument for SqlStatement
Available on crate feature oak-pretty-print only.
impl AsDocument for SqlStatement
Available on crate feature
oak-pretty-print only.Source§fn as_document(&self) -> Document<'_>
fn as_document(&self) -> Document<'_>
Converts this type to a document for pretty printing.
Source§impl Clone for SqlStatement
impl Clone for SqlStatement
Source§fn clone(&self) -> SqlStatement
fn clone(&self) -> SqlStatement
Returns a duplicate 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 SqlStatement
impl Debug for SqlStatement
Source§impl<'de> Deserialize<'de> for SqlStatement
impl<'de> Deserialize<'de> for SqlStatement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SqlStatement
impl Serialize for SqlStatement
Source§impl ToSource for SqlStatement
impl ToSource for SqlStatement
Source§fn to_source(&self, buffer: &mut SourceBuffer)
fn to_source(&self, buffer: &mut SourceBuffer)
Writes the source code representation of this type to the provided buffer.
Source§fn to_source_string(&self) -> String
fn to_source_string(&self) -> String
Converts this type to a source code string.
Auto Trait Implementations§
impl Freeze for SqlStatement
impl RefUnwindSafe for SqlStatement
impl Send for SqlStatement
impl Sync for SqlStatement
impl Unpin for SqlStatement
impl UnsafeUnpin for SqlStatement
impl UnwindSafe for SqlStatement
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