Struct msql_srv::QueryResultWriter[][src]

#[must_use]
pub struct QueryResultWriter<'a, W: Write> { /* fields omitted */ }
Expand description

Convenience type for providing query results to clients.

This type should not be dropped without calling start, completed, or error.

To send multiple resultsets, use RowWriter::finish_one and complete_one. These are similar to RowWriter::finish and completed, but both eventually yield back the QueryResultWriter so that another resultset can be sent. To indicate that no more resultset will be sent, call no_more_results. All methods on QueryResultWriter (except no_more_results) automatically start a new resultset. The QueryResultWriter may be dropped without calling no_more_results, but in this case the program may panic if an I/O error occurs when sending the end-of-records marker to the client. To handle such errors, call no_more_results explicitly.

Implementations

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.

Send an empty resultset response to the client indicating that rows rows were affected by the query in this resultset. last_insert_id may be given to communiate an identifier for a client’s most recent insertion.

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.

Reply to the client’s query with an error.

Send the last bits of the last resultset to the client, and indicate that there are no more resultsets coming.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.