ExtendedHandler

Trait ExtendedHandler 

Source
pub trait ExtendedHandler {
    // Required method
    fn row(&mut self, cols: RowDescription<'_>, row: DataRow<'_>) -> Result<()>;

    // Provided methods
    fn result_start(&mut self, cols: RowDescription<'_>) -> Result<()> { ... }
    fn result_end(&mut self, complete: CommandComplete<'_>) -> Result<()> { ... }
}
Expand description

Handler for extended query protocol.

Callback patterns by statement type:

  • SELECT with rows: result_startrow*result_end
  • SELECT with 0 rows: result_startresult_end
  • INSERT/UPDATE/DELETE: result_end only (with affected row count)

Required Methods§

Source

fn row(&mut self, cols: RowDescription<'_>, row: DataRow<'_>) -> Result<()>

Called for each data row.

Provided Methods§

Source

fn result_start(&mut self, cols: RowDescription<'_>) -> Result<()>

Called when a result set begins.

Source

fn result_end(&mut self, complete: CommandComplete<'_>) -> Result<()>

Called when a result set ends.

Implementors§