Skip to main content

copy_sink_callback

Macro copy_sink_callback 

Source
macro_rules! copy_sink_callback {
    ($name:ident, |$info:ident, $chunk:ident| $body:block) => { ... };
}
Expand description

Wraps a COPY ... TO sink callback so a panic becomes a DuckDB error.

The sink takes a data chunk as well as its info handle, so it has its own macro rather than sharing the single-argument implementation.

Requires the duckdb-1-5 feature.

ยงExample

quack_rs::copy_sink_callback!(my_sink, |info, chunk| {
    let _ = (info, chunk);
});