pub struct CommandStatement {
pub comments: Vec<String>,
pub kind: String,
pub body: String,
}Expand description
A raw-tail statement preserved verbatim for round-tripping.
Used for statements the parser accepts but does not model in detail —
SET, SHOW, GO, DECLARE, COMMENT ON …, ANALYZE, DESCRIBE,
LOAD, EXPLAIN (FORMAT …), vendor-specific ALTER TABLE tails,
CREATE OPERATOR/AGGREGATE/SEQUENCE/…, etc. The verb sequence is
preserved in kind and the remainder of the statement (up to the next
; or EOF) is captured in body exactly as it appeared in the input.
Fields§
§comments: Vec<String>Comments attached to this statement.
kind: StringLeading verb(s), uppercased — e.g. “SET”, “SHOW”, “GO”, “DECLARE”, “COMMENT ON”, “ANALYZE”, “DESCRIBE”, “LOAD”, “CREATE OPERATOR”, “ALTER TABLE”, “REM”.
body: StringRaw tail of the statement (everything after kind), reproduced
verbatim so round-tripping preserves the original wording.
Trait Implementations§
Source§impl Clone for CommandStatement
impl Clone for CommandStatement
Source§fn clone(&self) -> CommandStatement
fn clone(&self) -> CommandStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandStatement
impl Debug for CommandStatement
Source§impl<'de> Deserialize<'de> for CommandStatement
impl<'de> Deserialize<'de> for CommandStatement
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>,
Source§impl PartialEq for CommandStatement
impl PartialEq for CommandStatement
Source§fn eq(&self, other: &CommandStatement) -> bool
fn eq(&self, other: &CommandStatement) -> bool
self and other values to be equal, and is used by ==.