streamStartBatched method
Starts a batched streaming query.
The connectionId must be a valid active connection.
The sql should be a valid SQL SELECT statement.
The fetchSize specifies how many rows to fetch per batch.
The chunkSize specifies the buffer size in bytes.
Returns a stream ID on success, 0 on failure.
Implementation
int streamStartBatched(
int connectionId,
String sql, {
int fetchSize = 1000,
int chunkSize = 64 * 1024,
}) {
final sqlPtr = sql.toNativeUtf8();
try {
return _bindings.odbc_stream_start_batched(
connectionId,
sqlPtr.cast<bindings.Utf8>(),
fetchSize,
chunkSize,
);
} finally {
malloc.free(sqlPtr);
}
}