Merge this Miner into the given Miner.

@param Miner $Miner
to merge into
@param bool $overrideLimit
optional override limit, default true
@return Miner
15366
public function mergeInto(Miner $Miner, $overrideLimit = true)
    {
        if ($this->isSelect()) {
            $this->mergeSelectInto($Miner);
            $this->mergeFromInto($Miner);
            $this->mergeJoinInto($Miner);
            $this->mergeWhereInto($Miner);
            $this->mergeGroupByInto($Miner);
            $this->mergeHavingInto($Miner);
            $this->mergeOrderByInto($Miner);
            
            if ($overrideLimit) {
                $this->mergeLimitInto($Miner);
            }
        } elseif ($this->isInsert()) {
            $this->mergeInsertInto($Miner);
            $this->mergeSetInto($Miner);
        } elseif ($this->isReplace()) {
            $this->mergeReplaceInto($Miner);
            $this->mergeSetInto($Miner);
        } elseif ($this->isUpdate()) {
            $this->mergeUpdateInto($Miner);
            $this->mergeJoinInto($Miner);
            $this->mergeSetInto($Miner);
            $this->mergeWhereInto($Miner);
            
            // ORDER BY and LIMIT are only applicable when updating a single table.
            if (! $this->join) {
                $this->mergeOrderByInto($Miner);
                
                if ($overrideLimit) {
                    $this->mergeLimitInto($Miner);
                }
            }
        } elseif ($this->isDelete()) {
            $this->mergeDeleteInto($Miner);
            $this->mergeFromInto($Miner);
            $this->mergeJoinInto($Miner);
            $this->mergeWhereInto($Miner);
            
            // ORDER BY and LIMIT are only applicable when deleting from a single
            // table.
            if ($this->isDeleteTableFrom()) {
                $this->mergeOrderByInto($Miner);
                
                if ($overrideLimit) {
                    $this->mergeLimitInto($Miner);
                }
            }
        }
        
        return $Miner;
    }
698990
public function mergeFromInto(Miner $Miner)
    {
        if ($this->from) {
            $Miner->from($this->getFrom(), $this->getFromAlias());
        }

        return $Miner;
    }
430471
public function copy($source, $overrides = [])
    {
        $this->sourceId = $source;
        return $this->sync($overrides) ? $this : null;
    }
676289
public function then(callable $callback, callable $failure = null)
    {
        try {
            return (new ConcurrencyLimiter(
                $this->connection, $this->name, $this->maxLocks, $this->releaseAfter
            ))->block($this->timeout, $callback);
        } catch (LimiterTimeoutException $e) {
            if ($failure) {
                return $failure($e);
            }

            throw $e;
        }
    }
1351873
public function setLimit(int $limit)
    {
        $this->limit = $limit;
        if ($this->limit < $this->batchSize) {
            $this->batchSize = $this->limit;
        }

        return $this;
    }
718147
public function setLimit($limit)
    {
        if ($limit < 1 || !is_int($limit)) {
            throw new \InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249);
        }
        $this->limit = $limit;

        return $this;
    }
340895
public function mergeIntoValues(Miner $Miner)
    {
        if ($this->intoValues) {
            $Miner->intoValues($this->intoValues);
        }

        return $Miner;
    }
249499
public function limit($limit, $startFrom = false)
    {
        if ($startFrom !== false) {
            $this->setLimit(' LIMIT ' . $startFrom . ', ' . $limit);
        } else {
            $this->setLimit(' LIMIT ' . $limit);
        }

        return $this;
    }
560737
public function load($overwrite = false, $cache = true)
	{
		$config = array();

		// try to retrieve the config from the database
		try
		{
			$result = \DB::select('config')->from($this->table)->where('identifier', '=', $this->identifier)->execute();
		}
		catch (Database_Exception $e)
		{
			// strip the actual query from the message
			$msg = $e->getMessage();
			$msg = substr($msg, 0, strlen($msg)  - strlen(strrchr($msg, ':')));

			// and rethrow it
			throw new \Database_Exception($msg);
		}

		// did we succeed?
		if ($result->count())
		{
			empty($result[0]['config']) or $config = unserialize($this->parse_vars($result[0]['config']));
		}

		return $config;
	}
289525
public function getLimit(string $coin1, string $coin2): string
    {
        return $this->get(sprintf('%s/%s', Resources::LIMIT, Tools::buildPair($coin1, $coin2)))->limit;
    }
1122569
public function hidden($hidden = [], $override = false)
    {
        $this->hidden = $override ? $hidden : array_merge($this->hidden, $hidden);

        return $this;
    }
950525
public function config($key = null, $value = null, $override = false)
    {
        if (is_array($key) && is_bool($value)) {
            $override = $value;
        }

        return Util::operateArray($this->config, $key, $value, null, null, $override);
    }
862541
public function append($append = [], $override = false)
    {
        $this->append = $override ? $append : array_merge($this->append, $append);

        return $this;
    }
560789
public function blendFromSeed($seed_key, $overwrite = false)
    {
        $this->loadObjectDataFromSeed($seed_key);
        return $this->blend($overwrite);
    }
682272
public function addArray($array, $override)
    {
        foreach ($array as $key => $value) {
            $this->add($key, $value, $override);
        }
    }
153659
public function mergeSetInto(Miner $Miner)
    {
        foreach ($this->set as $set) {
            $Miner->set($set['column'], $set['value'], $set['quote']);
        }

        return $Miner;
    }
565209
public function mergeHavingInto(Miner $Miner)
    {
        foreach ($this->having as $having) {
            // Handle open/close brackets differently than other criteria.
            if (array_key_exists('bracket', $having)) {
                if (strcmp($having['bracket'], self::BRACKET_OPEN) == 0) {
                    $Miner->openHaving($having['connector']);
                } else {
                    $Miner->closeHaving();
                }
            } else {
                $Miner->having($having['column'], $having['value'], $having['operator'],
                    $having['connector'], $having['quote']);
            }
        }

        return $Miner;
    }