executeQueryParamBuffer method

Future<Uint8List?> executeQueryParamBuffer(
  1. int connectionId,
  2. String sql,
  3. Uint8List? paramBuffer, {
  4. int? maxBufferBytes,
})

Executes a parameterised query with a pre-serialised buffer (legacy v0 or DRT1 directed parameters).

Implementation

Future<Uint8List?> executeQueryParamBuffer(
  int connectionId,
  String sql,
  Uint8List? paramBuffer, {
  int? maxBufferBytes,
}) async {
  final bytes =
      paramBuffer == null || paramBuffer.isEmpty ? Uint8List(0) : paramBuffer;
  final r = await _sendRequest<QueryResponse>(
    ExecuteQueryParamsRequest(
      _nextRequestId(),
      connectionId,
      sql,
      bytes,
      maxResultBufferBytes: maxBufferBytes,
    ),
  );
  if (r.error != null) return null;
  return r.data;
}