streamStartAsync method
Starts async batched streaming query execution.
Returns stream ID (>0) on success, 0 on native failure, and null when async stream API is unavailable.
Implementation
int? streamStartAsync(
int connectionId,
String sql, {
int fetchSize = 1000,
int chunkSize = 64 * 1024,
}) {
if (!_bindings.supportsAsyncStreamApi) {
return null;
}
final sqlPtr = sql.toNativeUtf8();
try {
return _bindings.odbc_stream_start_async(
connectionId,
sqlPtr.cast<bindings.Utf8>(),
fetchSize,
chunkSize,
);
} finally {
malloc.free(sqlPtr);
}
}