sentinel-driver 2.0.0

High-performance PostgreSQL wire protocol driver for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::{pipeline, Connection, PipelineBatch, Result};

impl Connection {
    /// Create a pipeline batch for executing multiple queries in a single round-trip.
    ///
    /// Use `execute_pipeline()` to send the batch.
    pub fn pipeline(&self) -> PipelineBatch {
        PipelineBatch::new()
    }

    /// Execute a pipeline batch, returning results for each query.
    pub async fn execute_pipeline(
        &mut self,
        batch: PipelineBatch,
    ) -> Result<Vec<pipeline::QueryResult>> {
        batch.execute(&mut self.conn).await
    }
}