createRequest method
Returns a Buffer containing the command packet.
Implementation
@override
Buffer createRequest() {
var length = 0;
var types = List<int>.filled(_values.length * 2, 0);
var nullMap = createNullMap();
preparedValues = List.filled(_values.length, null);
for (var i = 0; i < _values.length; i++) {
final value = _values[i];
var parameterType = _getType(value);
types[i * 2] = parameterType;
types[i * 2 + 1] = 0;
preparedValues![i] = prepareValue(value);
length += measureValue(value, preparedValues![i]);
}
var buffer = writeValuesToBuffer(nullMap, length, types);
return buffer;
}