Skip to main content

export_to_callback

Function export_to_callback 

Source
pub async fn export_to_callback<T, F, Fut, R>(
    ws_transport: &mut T,
    source: ExportSource,
    options: CsvExportOptions,
    callback: F,
) -> Result<R, ExportError>
where T: TransportProtocol + ?Sized, F: FnOnce(DataPipeReceiver) -> Fut, Fut: Future<Output = Result<R, ExportError>>,
Expand description

Exports data from an Exasol table or query using a custom callback.

This is the most flexible export method, allowing you to process the data stream however you need.

§Arguments

  • ws_transport - WebSocket transport for executing SQL
  • source - The data source (table or query)
  • options - Export options
  • callback - A callback function that receives a DataPipeReceiver and processes the data

§Returns

The result of the callback function.

§Errors

Returns ExportError if the export fails.