Performs JOIN on tables.
@param string|Result|Literal $source Table name or subquery
@param string|Literal $condition
@return Result fluent interface
511821
public function join($source, $condition){
		if($this->validateConditions())
			return $this;

		if(!(is_string($source) || $source instanceof self || $source instanceof Literal))
			throw new InvalidArgumentException('Argument 1 must be a string, Neevo\\Literal or Neevo\\Result.');
		if(!(is_string($condition) || $condition instanceof Literal))
			throw new InvalidArgumentException('Argument 2 must be a string or Neevo\\Literal.');

		if($source instanceof self)
			$this->subqueries[] = $source;

		$this->resetState();
		$type = (func_num_args() > 2) ? func_get_arg(2) : '';

		$this->joins[] = array($source, $condition, $type);

		return $this;
	}
513443
public function raw_join($table, $constraint, $table_alias, $parameters = [])
        {
            // Add table alias if present
            if (!is_null($table_alias)) {
                $table_alias = $this->_quoteIdentifier($table_alias);
                $table .= " {$table_alias}";
            }

            $this->_values = array_merge($this->_values, $parameters);

            // Build the constraint
            if (Arrays::is($constraint)) {
                list($first_column, $operator, $second_column) = $constraint;

                $first_column = $this->_quoteIdentifier($first_column);
                $second_column = $this->_quoteIdentifier($second_column);
                $constraint = "{$first_column} {$operator} {$second_column}";
            }

            $this->_join_sources[] = "{$table} ON {$constraint}";

            return $this;
        }
597815
protected function executeSql($sql, Where $condition = null)
    {
        $condition = (new Where())->andWhere($condition);
        $sql = strtr($sql, ['{condition}' => $condition]);

        return $this
            ->getSession()
            ->getClientUsingPooler(
                'query_manager',
                null
            )
            ->query($sql, $condition->getValues())
            ;
    }
1063111
public static function render(SQL\Condition $condition)
    {
        $content = $condition->getContent();
        $parameters = $condition->getParameters();

        if ($parameters and is_string($content)) {
            $content = self::expandParameterArrays($content, $parameters);
        }

        return Compiler::expression(array(
            Compiler::name($condition->getColumn()),
            $content
        ));
    }
44494
protected function parseCondition($condition)
    {
        $tableAlias = $this->getAlias();
        $parts = [];

        if ($condition instanceof QueryBuilderAwareInterface) {
            $condition->setQueryBuilder($this);
        }

        if ($condition instanceof Expression) {
            $parts[] = $this->getAdapter()->quoteSql($condition->toSQL());
        } elseif ($condition instanceof Q) {
            $condition->setLookupBuilder($this->getLookupBuilder());
            $condition->setAdapter($this->getAdapter());
            $condition->setTableAlias($tableAlias);
            $parts[] = $condition->toSQL();
        } elseif ($condition instanceof ToSqlInterface) {
            $parts[] = $condition->toSQL();
        } elseif (is_array($condition)) {
            foreach ($condition as $key => $value) {
                if ($value instanceof Q) {
                    $parts[] = $this->parseCondition($value);
                } else {
                    list($lookup, $column, $lookupValue) = $this->lookupBuilder->parseLookup($this, $key, $value);
                    $column = $this->getLookupBuilder()->fetchColumnName($column);
                    if (false === empty($tableAlias) && false === strpos($column, '.')) {
                        $column = $tableAlias.'.'.$column;
                    }
                    $parts[] = $this->lookupBuilder->runLookup($this->getAdapter(), $lookup, $column, $lookupValue);
                }
            }
        } elseif (is_string($condition)) {
            $parts[] = $condition;
        } elseif ($condition instanceof Expression) {
            $parts[] = $condition->toSQL();
        }

        if (1 === count($parts)) {
            return $parts[0];
        }

        return '('.implode(') AND (', $parts).')';
    }
183727
public static function selectQuery($tableName, $fields, $data, $condition, $connection)
    {
        $query = "";
        $columnName = "";
        
        try
        {
            $arraySize = count($data);
            if( $arraySize > 1 && $condition == NULL)
            {
                $query = "Please Supply the condition";
            }
            else
            {
                if ($condition === 'AND' || $condition === 'OR' || $condition === NULL) {
                    $columnName = self::whereAndClause($tableName, $data, $condition);
                } elseif ($condition === 'LIKE') {
                    $columnName = self::whereLikeClause($tableName, $data, $condition);
                } 
                $query =  "SELECT $fields FROM $tableName WHERE $columnName";
            }
        } catch (PDOException $e) {
            $query = $e->getMessage();
        }

        return $query;
    }
497585
public function Concat( $source )
	{

		$source = is_array($source) ? $source : ( $source instanceof Queryable ? $source->toList() : iterator_to_array($source) );

		return $this
					->getClone()
					->setRepository( array_merge( $this->repository , $source ) );

	}
90674
function join($relation, $expr = null, $mode = Join::INNER)
    {
        if (null !== $expr) {
            $expr = new On(new AndX(array($expr)));
        }

        $join = new Join($relation, $expr);
        $join->mode = $mode;

        $this->nodes->source->right[] = $join;
        return $this;
    }
966469
private function setManyToManyJoin($table, $alias, $condition = null)
    {
        if (!in_array($alias, $this->tables)) {
            if ($condition) {
                $this->queryBuilder->join($table, $alias, 'WITH', $condition);
            } else {
                $this->queryBuilder->join($table, $alias);
            }
            $this->tables[] = $alias;
        }
    }
1240519
function InnerJoin(Table $table, Condition $condition, $prepend = false)
    {
        return $this->Join($table, JoinType::Inner(), $condition, $prepend);
    }
1034596
private function mapMemberCondition(MemberCondition $condition, Select $select, array $memberMappings) : Expr
    {
        $mapping = $memberMappings[$condition->getNestedMember()->asString()];

        return $mapping->getMapping()
            ->getWhereConditionExpr($select, $mapping->getLastTableAlias(), $condition->getOperator(), $condition->getValue());
    }
1346529
public function where($key, $condition)
    {
        $this->conditions[$key] = self::$conditionRegex[$condition];
        return $this;
    }
961581
public function join($table, $condition, $joinType = self::JOIN_LEFT)
    {
        $this->join[] = [
            'table' => $table,
            'condition' => $condition,
            'jointType' => $joinType
        ];
        return $this;
    }
598486
public function join($joinType, $alias, $table, $condition = null, $prefix = null)
    {
        $this->getQueryHelper()->addTable($alias, $table, $condition, $joinType, $prefix);

        return $this;
    }
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;
    }
482700
protected function aggregate(ConditionInterface $condition)
    {
        if (!$condition->getParameters()) {
            return '';
        }

        $this->aggNumber++;
        $prefix = str_repeat('_', $this->aggNumber);
        $qb = $this->cloneQb($this->queryBuilder);

        $this->resetSqlParts($qb)
            ->select(sprintf('DISTINCT %s%s', $prefix, $this->aliasDotPrimary()))
            ->addGroupBy(sprintf('%s%s', $prefix, $this->aliasDotPrimary()));
        /** @var From $fromPart */
        foreach ($this->getSqlPart($this->queryBuilder, 'from') as $fromPart) {
            /** @var Base $newFrom */
            $newFrom = new From($fromPart->getFrom(), $prefix.$fromPart->getAlias());
            $qb->add('from', $newFrom, true);
        }
        foreach ($this->getSqlPart($this->queryBuilder, 'join') as $rootAlias => $joinPart) {
            /** @var Join $subPart */
            foreach ($joinPart as $subPart) {
                $join = new Join(
                    $subPart->getJoinType(),
                    $prefix.$subPart->getJoin(),
                    $prefix.$subPart->getAlias()
                );
                /** @var Base $newJoin */
                $newJoin = [$prefix.$rootAlias => $join];
                $qb->add('join', $newJoin, true);
            }
        }

        $newParameters = [];
        foreach ($condition->getParameters() as $paramName => $paramValue) {
            $newParameters[str_replace(':', ':'.$prefix, $paramName)] = $paramValue;
        }

        if (count($newParameters) === 2 && stripos($condition->getComparisonOperator(), Condition::BETWEEN) !== false) {
            $newParameterName = implode(' AND ', array_keys($newParameters));
        } else {
            $newParameterName = key($newParameters);
        }

        $qb->andHaving($condition->getSqlFunctionDefinition($newParameterName, $prefix))->setParameters([]);

        foreach ($newParameters as $paramName => $paramValue) {
            $parameter = new Parameter($paramName, $paramValue);
            $this->parameters->add($parameter);
        }

        return sprintf('%s IN(%s)', $this->aliasDotPrimary(), $qb->getDQL());
    }
1334833
protected function aggregate(ConditionInterface $condition)
    {
        if (!$condition->getParameters()) {
            return '';
        }
        $this->aggNumber++;
        $prefix = str_repeat('_', $this->aggNumber);
        $qb = clone $this->queryBuilder;

        $this->resetSqlParts($qb)
            ->select(sprintf('DISTINCT %s%s', $prefix, $this->aliasDotPrimary()))
            ->addGroupBy(sprintf('%s%s', $prefix, $this->aliasDotPrimary()));
        foreach ($this->getSqlPart($this->queryBuilder, 'from') as $fromPart) {
            $fromPart['alias'] = $prefix.$fromPart['alias'];
            $qb->add('from', $fromPart, true);
        }
        foreach ($this->getSqlPart($this->queryBuilder, 'join') as $rootAlias => $joinPart) {
            foreach ($joinPart as $subPart) {
                $subPart['joinCondition'] = $prefix.str_replace(
                    [' '.$rootAlias.'.', ' '.$subPart['joinAlias'].'.'],
                    [' '.$prefix.$rootAlias.'.', ' '.$prefix.$subPart['joinAlias'].'.'],
                    $subPart['joinCondition']
                );
                $subPart['joinAlias'] = $prefix.$subPart['joinAlias'];
                $newJoin = [$prefix.$rootAlias => $subPart];
                /** @var string $newJoin -- HOOK :: The vendor function requires a "@string" parameter */
                $qb->add('join', $newJoin, true);
            }
        }

        $newParameters = [];
        foreach ($condition->getParameters() as $paramName => $paramValue) {
            $newParameters[str_replace(':', ':'.$prefix, $paramName)] = $paramValue;
        }

        if (count($newParameters) === 2 && stripos($condition->getComparisonOperator(), Condition::BETWEEN) !== false) {
            $newParameterName = implode(' AND ', array_keys($newParameters));
        } else {
            $newParameterName = key($newParameters);
        }
        $qb->andHaving($condition->getSqlFunctionDefinition($newParameterName, $prefix))->setParameters([]);

        foreach ($newParameters as $paramName => $paramValue) {
            $this->parameters[$newParameterName] = $paramValue;
            $this->parametersTypes[$newParameterName] = $this->inferType($paramValue);
        }

        return sprintf('%s IN(%s)', $this->aliasDotPrimary(), $qb->getSQL());
    }