getHighWaterProperty example

for ($count = 1; $count <= $n$count++) {
            $map_key = 'destid' . $count++;
            $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.


      // Check whether the row needs processing.       // 1. This row has not been imported yet.       // 2. Explicitly set to update.       // 3. The row is newer than the current high-water mark.       // 4. If no such property exists then try by checking the hash of the row.       if (!$row->getIdMap() || $row->needsUpdate() || $this->aboveHighWater($row) || $this->rowChanged($row)) {
        $this->currentRow = $row->freezeSource();
      }

      if ($this->getHighWaterProperty()) {
        $this->saveHighWater($row->getSourceProperty($this->highWaterProperty['name']));
      }
    }
  }

  /** * Position the iterator to the following row. */
  protected function fetchNextRow() {
    $this->getIterator()->next();
  }

  
Home | Imprint | This part of the site doesn't use cookies.