CommandCompleteMessage.parse constructor

  1. @internal
CommandCompleteMessage.parse(
  1. PgByteDataReader reader
)

Implementation

@internal
factory CommandCompleteMessage.parse(PgByteDataReader reader) {
  final str = reader.readNullTerminatedString();
  final match = _affectedRowsExp.firstMatch(str);
  var rowsAffected = 0;
  if (match != null) {
    rowsAffected = int.parse(match.group(0)!);
  }
  return CommandCompleteMessage._(rowsAffected);
}