Wrapper method for MongoCursor::tailable().

@see http://php.net/manual/en/mongocursor.tailable.php
@param boolean $tail
@return $this
10316
public function tailable($tail = true)
    {
        $tail = (boolean) $tail;
        $this->tailable = $tail;
        $this->mongoCursor->tailable($tail);
        return $this;
    }
174122
public function rollback()
    {
        parent::rollback();
        foreach ($this->getOriginalAll() as $collection) {
            if ($collection instanceof Collection) {
                $collection->rollback();
            }
        }
        return $this;
    }
249499
public function limit($limit, $startFrom = false)
    {
        if ($startFrom !== false) {
            $this->setLimit(' LIMIT ' . $startFrom . ', ' . $limit);
        } else {
            $this->setLimit(' LIMIT ' . $limit);
        }

        return $this;
    }
1235819
public function each($callback)  
    {
        Eden_Array_Argument::i()->test(1, 'callable');

        foreach ($this->data as $key => $value) {
            call_user_func($callback, $key, $value);
        }

        return $this;
    }
108531
public function transaction(callable $callback, bool $nested = true, bool $autoCommit = true): self
    {
        $trans = $this->getTransaction($nested);

        $trans->transaction($callback, $autoCommit);

        return $this;
    }
431804
public function limit($num)
    {
        $num = (integer) $num;
        $this->limit = $num;
        $this->mongoCursor->limit($num);
        return $this;
    }
977925
public function each(callable $callback)
    {
        if ($this->isCollection()) {
            foreach ($this->data as $val) {
                $callback($this->box($val));
            }
        } else {
            $callback($this->box($this->data));
        }

        return $this;
    }
930615
public function each( $callback ) {

			if ( is_callable( $callback ) ) {

				for ( $i=0; $i < $this->len; $i++ ) {

					if ( call_user_func( $callback, $this->items[$i], $i, $this ) === false ) {
						break;
					}

				}

			}

			return $this;

		}
198901
public function loop($status = false)
    {
        if($status) {
            $this->attributes['loop'] = true;
        } else {
            unset($this->attributes['loop']);
        }

        return $this;
    }
771155
final public function distinct($boolean = TRUE)
    {
        $this->arrayDistinct = (is_bool($boolean)) ? $boolean : TRUE;
        return $this;
    }
787095
public function immortal($liveForever = true)
    {
        $liveForever = (boolean) $liveForever;
        $this->immortal = $liveForever;
        $this->mongoCursor->immortal($liveForever);
        return $this;
    }
1095360
function setModelPersist(MongoDB\BSON\Persistable $persistable)
    {
        // reset _query collection
        $this->_q = null;
        
        $this->typeMap['root'] = get_class($persistable);
        $this->persist = $this->typeMap['root'];
        return $this;
    }
409412
public function each(callable $callback)
    {
        foreach ($this->items as $key => $item) {
            if ($callback($item, $key) === false) {
                break;
            }
        }

        return $this;
    }
1294453
public function setGroupable($groupable = true)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setGroupable($groupable);
        }

        return $this;
    }
478526
public function setMaxResults($limit)
    {
        $limit = (int)$limit;

        if(0 === $limit) {
            $this->getStatement()->removeClause('limit');
        } else {
            // 
            $this->getStatement()->setClause('limit', new Expr\LimitClause($limit));
        }

        return $this;
    }
205595
public function takeUntil(callable $predicate)
    {
        return $this->takeWhile(
            function ($value, $key, $iterable) use ($predicate) {
                return !$predicate($value, $key, $iterable);
            }
        );
    }
1191613
public function transaction(callable $callback, $that = null, $default = null)
    {
        if ($that === null) {
            $that = $this;
        }

        $pdo = $this->getPDO();

        if ($pdo->inTransaction()) {
            return $callback($that);
        }

        $result = $default;

        try {
            $pdo->beginTransaction();
            $result = $callback($that);
            $pdo->commit();
        } catch (PDOException $exception) {
            $pdo->rollBack();
            if ($this->throwTransactionExceptions) {
                throw $exception;
            }
        }

        return $result;
    }