makeReferenceToValueFromOpResult static method

void makeReferenceToValueFromOpResult(
  1. Map? map
)

Implementation

static void makeReferenceToValueFromOpResult(Map? map) {
  map?.forEach((key, value) {
    if (value is OpResult) {
      if (OperationTypeExt.supportIntResultType
          .contains(value.operationType)) {
        value = value.makeReference();
      } else {
        throw ArgumentError(
            "OpResult/OpResultValueReference from this operation in this place not supported");
      }
    } else if (value is OpResultValueReference) {
      if (_createUpdatePropName(value) ||
          _createBulkResultIndex(value) ||
          _findPropNameResultIndex(value)) {
        value = value.makeReference();
      } else {
        throw ArgumentError(
            "OpResult/OpResultValueReference from this operation in this place not supported");
      }
    }
  });
}