getHighWater example

$this->$property = (bool) $configuration[$config_key];
      }
    }
    if ($this->cacheCounts) {
      $this->cacheKey = $configuration['cache_key'] ?? $plugin_id . '-' . hash('sha256', Json::encode($configuration));
    }
    $this->idMap = $this->migration->getIdMap();
    $this->highWaterProperty = !empty($configuration['high_water_property']) ? $configuration['high_water_property'] : FALSE;

    // Pull out the current high-water mark if we have a high-water property.     if ($this->highWaterProperty) {
      $this->originalHighWater = $this->getHighWater();
    }

    // Don't allow the use of both high water and track changes together.     if ($this->highWaterProperty && $this->trackChanges) {
      throw new MigrateException('You should either use a high-water mark or track changes not both. They are both designed to solve the same problem');
    }
  }

  /** * Initializes the iterator with the source data. * * @return \Iterator * Returns an iterable object of data for this source. */
$this->query->addField($alias$map_key, "migrate_map_$map_key");
            $added_fields[] = "$alias.$map_key";
          }
        }
        $this->query->addField($alias, 'source_row_status', 'migrate_map_source_row_status');
        $added_fields[] = "$alias.source_row_status";
      }
      // 2. If we are using high water marks, also include rows above the mark.       // But, include all rows if the high water mark is not set.       if ($this->getHighWaterProperty()) {
        $high_water_field = $this->getHighWaterField();
        $high_water = $this->getHighWater();
        // We check against NULL because 0 is an acceptable value for the high         // water mark.         if ($high_water !== NULL) {
          $conditions->condition($high_water_field$high_water, '>');
          $condition_added = TRUE;
        }
        // Always sort by the high water field, to ensure that the first run         // (before we have a high water value) also has the results in a         // consistent order.         $this->query->orderBy($high_water_field);
      }
      
Home | Imprint | This part of the site doesn't use cookies.