Called within a transaction, gets the next sequence value
@access private
14895
public function _nextSequence($sequence)
    {
        $sequence = strtoupper($sequence);
        $id = $this->_lockSequence($sequence);
        $increment = $this->_connection->execute(
            "UPDATE sequences SET id=id+1 WHERE name=?", $sequence);

        return $id;
    }
264668
protected function NextItem()
	{
		if ( $this->empty ) return null;

		/**
		 * @var int $index
		 */
		$index = $this->getCurrentPosition() + 1;
		if ( $index < count( $this->buffer ) )
		{
			return $this->buffer[ $index ];
		}
		else if ( ! $this->filled )
		{
			if ( ! $this->src->getIsFinished() )
			{
				if ( $this->src->MoveNext() )
				{
					$current = $this->src->getCurrent();
					$this->buffer[] = $current;
					return $current;
				}
				else
				{
					$this->filled = true;
				}
			}

			if ( ! count( $this->buffer ) )
			{
				$this->empty = true;
			}
		}

		return null;
	}
568154
public function next()
    {
        $this->currentRow = $this->stmt->fetch(PDO::FETCH_NUM);
        $this->currentKey++;
        $this->isValid = (boolean) $this->currentRow;
        if (!$this->isValid) {
            $this->closeCursor();
            if ($this->enableInstancePoolingOnFinish) {
                Propel::enableInstancePooling();
            }
        }
    }
1030508
function next() {
        if ($this->valid()) {
            $last = $this->key();
            $this->currentResult++;
            if (!isset($this->cache[$this->currentResult])) {
                $this->load($last+1);
            }
        }
    }
1177710
public function next()
    {
        if (count($this->data) > 0) {
            array_shift($this->data);
        }
        ++$this->position;

        if (count($this->data) == 0 && !is_null($this->resumptionToken)) {
            $this->fetchMore();
        }

        if (count($this->data) == 0) {
            return null;
        }
    }
369449
def next_sequence_value(sequence_name)
      # if sequence_name is set to :autogenerated then it means that primary key will be populated by trigger
      return nil if sequence_name == AUTOGENERATED_SEQUENCE_NAME
      sequence_name = quote_table_name(sequence_name)
      sql = "SELECT #{sequence_name}.NEXTVAL id FROM dual"
      log(sql, 'SQL') { @connection.next_sequence_value(sequence_name) }
    end
754607
public function values(): Sequence
    {
        $value = function($pair) {
            return $pair->value;
        };

        return new Vector(array_map($value, $this->pairs));
    }
1208406
protected function parseTransactionValueTimestamp()
    {
        $results = [];
        if (preg_match(self::PATTERN_TAG_61, $this->getCurrentTransactionData(), $results)) {
            return $this->sanitizeTimestamp($results[1]);
        }

        return 0;
    }
1200785
public function get_transaction_start_backtrace() {
        if (!$this->transactions) {
            return null;
        }
        $lowesttransaction = end($this->transactions);
        return $lowesttransaction->get_backtrace();
    }
1269674
public static function getSequenceName()
    {
        $cls = get_called_class();
        if (!array_key_exists($cls, self::$_sequence)) {
            return null;
        }
        return self::$_sequence[$cls];
    }
1164331
public function next()
    {
        $this->currentOverriddenEvent = null;
        ++$this->counter;
        if ($this->nextDate) {
            // We had a stored value.
            $nextDate = $this->nextDate;
            $this->nextDate = null;
        } else {
            // We need to ask rruleparser for the next date.
            // We need to do this until we find a date that's not in the
            // exception list.
            do {
                if (!$this->recurIterator->valid()) {
                    $nextDate = null;
                    break;
                }
                $nextDate = $this->recurIterator->current();
                $this->recurIterator->next();
            } while (isset($this->exceptions[$nextDate->getTimeStamp()]));
        }

        // $nextDate now contains what rrule thinks is the next one, but an
        // overridden event may cut ahead.
        if ($this->overriddenEventsIndex) {
            $offsets = end($this->overriddenEventsIndex);
            $timestamp = key($this->overriddenEventsIndex);
            $offset = end($offsets);
            if (!$nextDate || $timestamp < $nextDate->getTimeStamp()) {
                // Overridden event comes first.
                $this->currentOverriddenEvent = $this->overriddenEvents[$offset];

                // Putting the rrule next date aside.
                $this->nextDate = $nextDate;
                $this->currentDate = $this->currentOverriddenEvent->DTSTART->getDateTime($this->timeZone);

                // Ensuring that this item will only be used once.
                array_pop($this->overriddenEventsIndex[$timestamp]);
                if (!$this->overriddenEventsIndex[$timestamp]) {
                    array_pop($this->overriddenEventsIndex);
                }

                // Exit point!
                return;
            }
        }

        $this->currentDate = $nextDate;
    }
1125017
public function next() {
        if (is_int($this->current)) {
            return $this->get($this->current + 1);
        }

        return $this->first;
    }
205436
function next()
    {
        if (isset($this->_limit) && $this->offset >= $this->_limit)
        {
            return null;
        }
    
        if (!isset($this->data) || ($this->pos >= sizeof($this->data) && $this->truncated))
        {
            $this->loadNextPage();
        }
        
        if ($this->pos < sizeof($this->data))
        {
            $item_data = $this->data[$this->pos];
            $this->pos++;        
            $this->offset++;            
            $cls = $this->item_cls;
            return new $cls($this->api, $item_data, true);
        }
        else
        {
            return null;
        }
    }
1305898
public function getNextOccurrence($after_timestamp = null) {
		if ($after_timestamp === null) {
			$after_timestamp = time();
		}
		
		$after_timestamp = (int) $after_timestamp;

		$next = false;
		if ($this->isRecurring()) {
			$next = $this->calculateEndAfterTimestamp(1, $after_timestamp, false);
		} else if ($after_timestamp < $this->getStartTimestamp()) {
			$next = $this->getStartTimestamp();
		}

		if ($this->repeat_end_timestamp && $this->repeat_end_timestamp < $next) {
			return false;
		}

		return $next;
	}
1145960
public function sequence($sequence_name, $type = 'nextval', $tenant = null, $module = null) {
		return $this->object->sequence($sequence_name, $type, $tenant, $module);
	}
1255771
protected function NextItem()
	{
		while (true)
		{
			if ( ! $this->accept)
			{
				if ( ! $this->MoveNextIter() )
					return null;
				$this->nav = $this->curr->CloneInstance();
				$this->curr->MoveToRoot();
			}
			$this->accept = $this->curr->MoveToFollowing( $this->kind, $this->nav );
			if ( $this->accept )
			{
				if ( $this->curr->isNodeAncestorOf( $this->nav ) ) continue;

				if ( $this->TestItem() )
				{
					$this->sequentialPosition++;
					return $this->curr;
				}
			}
		}
	}
1193903
public function next()
    {
        if ($this->limit && $this->currentPos >= $this->limit) { // it won't go further than the selected limit
            return null;
        }
        $oldLimit = $this->limit;
        $oldOffset = $this->offset;
        $this->limit = 1;
        $this->offset += $this->currentPos;
        $rows = $this->get();
        $this->limit = $oldLimit;
        $this->offset = $oldOffset;
        $this->currentPos++;
        return isset($rows[0]) ? $rows[0] : null;
    }