Expand description
explicit pipelining module
this crate supports “implicit” pipeline like tokio-postgres
does and explicit pipeline is an optional addition.
making pipelined queries with explicit types and apis has following benefits:
- reduced lock contention. explicit pipeline only lock client once when executed regardless query count
- flexible transform between sync and un-sync pipeline. See Pipeline::new for detail
- ordered response handling with a single stream type. reduce memory footprint and possibility of deadlock
Structs§
- Borrowed
- borrowed bytes buffer supplied by api caller
- Owned
- owned bytes buffer created by Pipeline
- Pipeline
- A pipelined sql query type. It lazily batch queries into local buffer and try to send it with the least amount of syscall when pipeline starts.
- Pipeline
Item - streaming item of certain query inside pipeline’s PipelineStream. impl AsyncLendingIterator and can be used to collect Row from item.
- Pipeline
Query - Pipeline
Stream - streaming response of pipeline. impl AsyncLendingIterator trait and can be collected asynchronously.