Struct clickhouse::insert::Insert
source · pub struct Insert<T> { /* private fields */ }
Expand description
Performs only one INSERT
.
Rows are being sent progressively to spread network load.
Implementations§
source§impl<T> Insert<T>
impl<T> Insert<T>
sourcepub fn with_timeouts(
self,
send_timeout: Option<Duration>,
end_timeout: Option<Duration>
) -> Self
pub fn with_timeouts( self, send_timeout: Option<Duration>, end_timeout: Option<Duration> ) -> Self
Sets timeouts for different operations.
send_timeout
restricts time on sending a data chunk to a socket.
None
disables the timeout, it’s a default.
It’s roughly equivalent to tokio::time::timeout(insert.write(..))
.
end_timeout
restricts time on waiting for a response from the CH server.
Thus, it includes all work needed to handle INSERT
by the CH server,
e.g. handling all materialized views and so on.
None
disables the timeout, it’s a default.
It’s roughly equivalent to tokio::time::timeout(insert.end(..))
.
These timeouts are much more performant (~x10) than wrapping write()
and end()
calls
into tokio::time::timeout()
.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Insert<T>
impl<T> Send for Insert<T>
impl<T> Sync for Insert<T>
impl<T> Unpin for Insert<T>
impl<T> !UnwindSafe for Insert<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more