length property

int get length

Implementation

int get length {
  if (_cachedLength == -1) {
    var inputParameterElementCount = _parameters.length;
    if (_typeSpecCount == _parameters.length || _typeSpecCount == 0) {
      inputParameterElementCount = 1;
    }

    _cachedLength = 15;
    _cachedLength += _statementName.byteLength;
    _cachedLength += _portalName.byteLength;
    _cachedLength += inputParameterElementCount * 2;
    _cachedLength +=
        _parameters.fold<int>(0, (len, ParameterValue paramValue) {
      if (paramValue.bytes == null) {
        return len + 4;
      } else {
        return len + 4 + paramValue.length;
      }
    });
  }
  return _cachedLength;
}