Skip to main content

Module insert_stream

Module insert_stream 

Source
Expand description

Write-side streaming INSERT.

The counterpart to QueryStream: send an INSERT statement without data, then push the rows in chunks in any input format the engine understands. append blocks when the engine applies backpressure, so a producer faster than the engine is throttled rather than buffered without bound.

§Ownership

chdb_stream_insert_n returns a handle that is never null — an initialisation failure is reported through chdb_stream_insert_error, not by a null return. The handle must be destroyed on every path, including error paths, and neither finishing nor cancelling frees it. Drop handles the paths InsertStream::finish and InsertStream::cancel do not.

Structs§

InsertStream
An open streaming INSERT.
WriteStats
What a finished insert wrote.

Constants§

DEFAULT_WRITE_BUFFER
The default for InsertStream::with_write_buffer.