streamFetch method

StreamFetchResult streamFetch(
  1. int streamId
)
inherited

Fetches the next chunk of data from a streaming query.

The streamId must be a valid stream identifier from streamStart.

Returns a StreamFetchResult with success status, data, and hasMore flag.

Implementation

StreamFetchResult streamFetch(int streamId) {
  final fetched = streamCallWithBuffer(
    (buf, bufLen, outWritten, hasMore) => _bindings.odbc_stream_fetch(
      streamId,
      buf,
      bufLen,
      outWritten,
      hasMore,
    ),
  );
  if (fetched != null) {
    return StreamFetchResult(
      success: true,
      data: fetched.data,
      hasMore: fetched.hasMore,
    );
  }
  return StreamFetchResult(
    success: false,
    data: null,
    hasMore: false,
  );
}