executeAsync method
Executes sql in non-blocking mode using native async request lifecycle.
Flow: start -> poll -> get_result -> free.
Returns the binary result when execution completes successfully, or null
on failure/cancellation/timeout.
Implementation
Future<Uint8List?> executeAsync(
int connectionId,
String sql, {
Duration pollInterval = const Duration(milliseconds: 10),
Duration? timeout,
int? maxBufferBytes,
}) async {
final requestId = await executeAsyncStart(connectionId, sql);
if (requestId <= 0) {
return null;
}
return _waitForAsyncResult(
requestId,
pollInterval: pollInterval,
timeout: timeout,
maxBufferBytes: maxBufferBytes,
);
}