quasardb C API
|
#include <arrow_abi.h>
Data Fields | |
ArrowDeviceType | device_type |
The device that this stream produces data on. | |
int(* | get_schema )(struct ArrowDeviceArrayStream *self, struct ArrowSchema *out) |
int(* | get_next )(struct ArrowDeviceArrayStream *self, struct ArrowDeviceArray *out) |
const char *(* | get_last_error )(struct ArrowDeviceArrayStream *self) |
void(* | release )(struct ArrowDeviceArrayStream *self) |
void * | private_data |
Opaque producer-specific data. | |
Equivalent to ArrowArrayStream, but for ArrowDeviceArrays.
This stream is intended to provide a stream of data on a single device, if a producer wants data to be produced on multiple devices then multiple streams should be provided. One per device.
const char*(* ArrowDeviceArrayStream::get_last_error)(struct ArrowDeviceArrayStream *self) |
Callback to get optional detailed error information. This must only be called if the last stream operation failed with a non-0 return code.
Return value: pointer to a null-terminated character array describing the last error, or NULL if no description is available.
The returned pointer is only valid until the next operation on this stream (including release).
int(* ArrowDeviceArrayStream::get_next)(struct ArrowDeviceArrayStream *self, struct ArrowDeviceArray *out) |
Callback to get the next array (if no error and the array is released, the stream has ended)
Return value: 0 if successful, an errno
-compatible error code otherwise.
If successful, the ArrowDeviceArray must be released independently from the stream.
int(* ArrowDeviceArrayStream::get_schema)(struct ArrowDeviceArrayStream *self, struct ArrowSchema *out) |
Callback to get the stream schema (will be the same for all arrays in the stream).
Return value 0 if successful, an errno
-compatible error code otherwise.
If successful, the ArrowSchema must be released independently from the stream. The schema should be accessible via CPU memory.
void(* ArrowDeviceArrayStream::release)(struct ArrowDeviceArrayStream *self) |
Release callback: release the stream's own resources. Note that arrays returned by get_next
must be individually released.