pub struct CommandOutput {
pub status: String,
pub rendered: Option<String>,
}Expand description
Output of running one SQL statement through the engine.
Two fields:
statusis the short human-readable confirmation line every caller wants (“INSERT Statement executed.”, “3 rows updated.”, “BEGIN”, etc.).renderedis the pre-formatted prettytable rendering of a SELECT’s result rows. Populated only forSELECTstatements;Nonefor every other statement type. The REPL prints this above the status line so users see both the rows and the confirmation; SDK / FFI / MCP callers ignore it and reach for the typed-row APIs (Connection::prepare→Statement::query→Rows) when they want row data instead.
Splitting the two means process_command_with_render can return
everything the REPL needs without writing to stdout itself —
historically process_command would print!() the rendered table
directly, which corrupted any non-REPL stdout channel (the MCP server’s
JSON-RPC wire, structured loggers piping engine output, …).
Fields§
§status: String§rendered: Option<String>Trait Implementations§
Source§impl Clone for CommandOutput
impl Clone for CommandOutput
Source§fn clone(&self) -> CommandOutput
fn clone(&self) -> CommandOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CommandOutput
impl RefUnwindSafe for CommandOutput
impl Send for CommandOutput
impl Sync for CommandOutput
impl Unpin for CommandOutput
impl UnsafeUnpin for CommandOutput
impl UnwindSafe for CommandOutput
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