Struct msql_srv::QueryResultWriter
[−]
[src]
#[must_use]pub struct QueryResultWriter<'a, W: Write + 'a> { /* fields omitted */ }
Convenience type for providing query results to clients.
This type should not be dropped without calling
start
,
completed
, or
error
.
Methods
impl<'a, W: Write> QueryResultWriter<'a, W>
[src]
fn start(self, columns: &'a [Column]) -> Result<RowWriter<'a, W>>
[src]
Start a resultset response to the client that conforms to the given columns
.
Note that if no columns are emitted, any written rows are ignored.
See RowWriter
.
fn completed(self, rows: u64, last_insert_id: u64) -> Result<()>
[src]
Send an empty resultset response to the client indicating that rows
rows were affected by
the query. last_insert_id
may be given to communiate an identifier for a client's most
recent insertion.
fn error<E: ?Sized>(self, kind: ErrorKind, msg: &E) -> Result<()> where
E: Borrow<[u8]>,
[src]
E: Borrow<[u8]>,
Reply to the client's query with an error.