executePrepared method
Future<Uint8List?>
executePrepared(
- int stmtId,
- List<
ParamValue> ? params, - int timeoutOverrideMs,
- int fetchSize, {
- int? maxBufferBytes,
- int? initialBufferBytes,
inherited
Executes a prepared statement stmtId in the worker with optional
params. Returns the binary result, or null on error.
Implementation
Future<Uint8List?> executePrepared(
int stmtId,
List<ParamValue>? params,
int timeoutOverrideMs,
int fetchSize, {
int? maxBufferBytes,
int? initialBufferBytes,
}) async {
final bytes =
params == null || params.isEmpty ? null : serializeParams(params);
final r = await _sendRequest<QueryResponse>(
ExecutePreparedRequest.withSerializedParams(
_nextRequestId(),
stmtId,
bytes ?? Uint8List(0),
timeoutOverrideMs: timeoutOverrideMs,
fetchSize: fetchSize,
maxResultBufferBytes: maxBufferBytes,
initialResultBufferBytes: initialBufferBytes,
),
);
if (r.error != null) return null;
return r.data;
}