CommandCompleteMessage constructor
Implementation
factory CommandCompleteMessage(Uint8List bytes, Encoding encoding) {
final str = encoding.decode(bytes.sublist(0, bytes.length - 1));
final match = _affectedRowsExp.firstMatch(str);
var rowsAffected = 0;
if (match != null) {
rowsAffected = int.parse(match.group(0)!);
}
return CommandCompleteMessage._(rowsAffected);
}