Returns a new source as left join of this and the given source.
@param Source $source
@param Condition $condition
@return Join
764209
function LeftJoin(Table $table, Condition $condition, $prepend = false)
    {
        return $this->Join($table, JoinType::Left(), $condition, $prepend);
    }
185519
public function leftJoinOnTo($source, $table, $on)
    {
        $this->join('LEFT', $source, $table, $on);

        return $this;
    }
1180831
public function andHeader($header, Condition $condition)
    {
        $this->headers->setHeaderCondition(
            new HeaderName($header),
            HeaderCondition::fromCondition($condition)
        );

        return $this;
    }
56973
public function join($join, $condition = null, $type = 'INNER')
    {
        if (empty($condition)) {
            // 如果为组数，则循环调用join
            foreach ($join as $key => $value) {
                if (is_array($value) && 2 <= count($value)) {
                    $this->join($value[0], $value[1], isset($value[2]) ? $value[2] : $type);
                }
            }
        } else {
            $table = $this->getJoinTable($join);

            $this->options['join'][] = [$table, strtoupper($type), $condition];
        }

        return $this;
    }
298143
private function mapCondition(Condition $condition, Select $select, array $memberMappings) : Expr
    {
        /** @var MemberMappingWithTableAliases[] $memberMappings */

        if ($condition instanceof AndCondition) {
            $expressions = [];
            foreach ($condition->getConditions() as $condition) {
                $expressions[] = $this->mapCondition($condition, $select, $memberMappings);
            }

            return Expr::compoundAnd($expressions);
        } elseif ($condition instanceof OrCondition) {
            $expressions = [];
            foreach ($condition->getConditions() as $condition) {
                $expressions[] = $this->mapCondition($condition, $select, $memberMappings);
            }

            return Expr::compoundOr($expressions);
        } elseif ($condition instanceof MemberCondition) {
            return $this->mapMemberCondition($condition, $select, $memberMappings);
        } elseif ($condition instanceof InstanceOfCondition) {
            return $this->mapper->getMapping()->getClassConditionExpr($select, $condition->getClass());
        } elseif ($condition instanceof NotCondition) {
            return Expr::not($this->mapCondition($condition->getCondition(), $select, $memberMappings));
        }

        throw InvalidArgumentException::format(
            'Unknown condition type %s', get_class($condition)
        );
    }
558878
function RightJoin(Table $table, Condition $condition, $prepend = false)
    {
        return $this->Join($table, JoinType::Right(), $condition, $prepend);
    }
417109
public function join($table, $condition = null, $type = 'LEFT')
    {
        settype($table, 'array');

        $data = array(
            'table'     => current($table),
            'condition' => $condition,
            'type'      => $type
        );

        if (is_string(key($table))) {
            $this->join[key($table)] = $data;
        } else {
            $this->join[] = $data;
        }

        return $this;
    }
966531
protected function CreateConditionLT(Selectable $leftHandSide, Selectable $rightHandSide)
    {
        return Condition::LT($this->connection, $leftHandSide, $rightHandSide);
    }
226115
public function join($type, $table, $condition)
    {
        settype($condition, 'array');

        //The table needle
        $needle = $this->_adapter->getTableNeedle();

        if (strpos($table, $needle) !== 0) {
            $table = $needle.$table;
        }

        $this->join[] = array(
            'type'      => strtoupper($type),
            'table'     => $table,
            'condition' => $condition,
        );

        return $this;
    }
1071683
public function source($source = null)
    {
        if (!func_num_args()) {
            return $this->_source;
        }
        $this->_source = $source;
        return $this;
    }
83506
public function leftJoin($table, $constraint, $tableAlias = null)
    {
        return $this->addJoinSource('LEFT', $table, $constraint, $tableAlias);
    }
612789
public function addCondition(Condition $condition): Condition
    {
        $query = $this->connection->createQueryBuilder()
            ->insert('ngbm_rule_condition')
            ->values(
                [
                    'id' => ':id',
                    'status' => ':status',
                    'rule_id' => ':rule_id',
                    'type' => ':type',
                    'value' => ':value',
                ]
            )
            ->setValue(
                'id',
                $condition->id !== null ?
                    (int) $condition->id :
                    $this->connectionHelper->getAutoIncrementValue('ngbm_rule_condition')
            )
            ->setParameter('status', $condition->status, Type::INTEGER)
            ->setParameter('rule_id', $condition->ruleId, Type::INTEGER)
            ->setParameter('type', $condition->type, Type::STRING)
            ->setParameter('value', json_encode($condition->value), Type::STRING);

        $query->execute();

        $condition->id = $condition->id ?? (int) $this->connectionHelper->lastInsertId('ngbm_rule_condition');

        return $condition;
    }
235641
public function buildJoinCondition(Criteria $c)
    {
        $joinCondition = null;
        for ($i = 0; $i < $this->count; $i++) {
            $criterion = $c->getNewCriterion($this->getLeftColumn($i), $this->getLeftColumn($i) . $this->getOperator($i) . $this->getRightColumn($i), Criteria::CUSTOM);
            if (null === $joinCondition) {
                $joinCondition = $criterion;
            } else {
                $joinCondition = $joinCondition->addAnd($criterion);
            }
        }
        $this->joinCondition = $joinCondition;
    }
893868
public function Join(string $table, string $as, string $by, string $condition): QueryBuilder
    {
        $this->join[] = [
            'table' => $table,
            'as' => $as,
            'by' => $by,
            'cond' => $condition
        ];
        
        return $this;
    }
795126
protected function joinCondition(array $condition): string
	{
		return $this->column($condition['column1']) . ' ' . $condition['operator'] . ' ' . $this->column($condition['column2']);
	}
935452
public function addCondition(ConditionAbstract $condition)
    {
        if ($condition instanceof SupportsCondition) {
            $this->conditions[] = $condition;
        } else {
            throw new \InvalidArgumentException(
                "Invalid condition instance. Instance of 'SupportsCondition' expected."
            );
        }

        return $this;
    }
736525
public function leftJoin($table, $alias_or_cond, $cond = null) {
		if (is_null($cond))
			$this->joins[] = new JoinClause(JoinClause::LEFT_JOIN, $table, null, $alias_or_cond);
		else
			$this->joins[] = new JoinClause(JoinClause::LEFT_JOIN, $table, $alias_or_cond, $cond);
		return $this;
	}