Build "from" clause of query

@param from alias of source entity
@param <T> type of source entity
@return joiner query
489847
public static <T> JoinerQuery<T, T> from(EntityPath<T> from) {
        return new JoinerQueryBase<>(from, from);
    }
996774
public static <T> JPQLQuery<T> select(Expression<T> expr) {
        return new JPASubQuery<Void>().select(expr);
    }
940617
public function innerJoinOneTable(
        string $fromAlias,
        string $fromColumn,
        string $targetTable,
        string $targetColumn
    ): string {
        $targetAlias   = $this->createAlias($targetTable);
        $joinCondition = $this->quoteDoubleIdentifier($fromAlias, $fromColumn) . '=' .
            $this->quoteDoubleIdentifier($targetAlias, $targetColumn);

        $this->innerJoin(
            $this->quoteSingleIdentifier($fromAlias),
            $this->quoteSingleIdentifier($targetTable),
            $this->quoteSingleIdentifier($targetAlias),
            $joinCondition
        );

        return $targetAlias;
    }
931468
public function addJoin($join_field, $alias, $type = Join::INNER_JOIN, $cond = '')
    {
        $this->_queryBuilder->addJoin($join_field, $alias, $type, $cond);
        return $this;
    }
154487
public static <T extends Query<?, R>, R extends Object> FluentAnswer<T, R> createAnswer(Class<T> type) {
    return new FluentAnswer<T, R>(type);
  }
569331
@SuppressWarnings("unchecked")
    public <RT> Q union(Path<?> alias, SubQueryExpression<RT>... sq) {
        return from(UnionUtils.union(ImmutableList.copyOf(sq), (Path) alias, false));
    }
335477
public SelectBuilder join(Class<?> from, Class<?> to) {
    currentTable = rootTable.join(from, to);

    return this;
  }
48554
public static ComponentUpdateDto copyFrom(ComponentDto from) {
    return new ComponentUpdateDto()
      .setUuid(from.uuid())
      .setBChanged(false)
      .setBKey(from.getDbKey())
      .setBCopyComponentUuid(from.getCopyResourceUuid())
      .setBDescription(from.description())
      .setBEnabled(from.isEnabled())
      .setBUuidPath(from.getUuidPath())
      .setBLanguage(from.language())
      .setBLongName(from.longName())
      .setBModuleUuid(from.moduleUuid())
      .setBModuleUuidPath(from.moduleUuidPath())
      .setBName(from.name())
      .setBPath(from.path())
      // We don't have a b_scope. The applyBChangesForRootComponentUuid query is using a case ... when to infer scope from the qualifier
      .setBQualifier(from.qualifier());
  }
259499
private void buildJoinTreeForColumn(String aColName, boolean useOuterJoin, UserAlias aUserAlias, Map pathClasses)
	{
		String pathName = SqlHelper.cleanPath(aColName);
		int sepPos = pathName.lastIndexOf(".");

		if (sepPos >= 0)
		{
			getTableAlias(pathName.substring(0, sepPos), useOuterJoin, aUserAlias,
						  new String[]{pathName.substring(sepPos + 1)}, pathClasses);
		}
	}
21688
public <P> Q leftJoin(Path<? extends Collection<P>> target, Path<P> alias) {
        getMetadata().addJoin(JoinType.LEFTJOIN, createAlias(target, alias));
        return queryMixin.getSelf();
    }
849040
private void buildMappings(final CronDefinition from, final CronDefinition to) {
        final Map<CronFieldName, FieldDefinition> sourceFieldDefinitions = getFieldDefinitions(from);
        final Map<CronFieldName, FieldDefinition> destFieldDefinitions = getFieldDefinitions(to);
        boolean startedDestMapping = false;
        boolean startedSourceMapping = false;
        for (final CronFieldName name : CronFieldName.values()) {
            final FieldDefinition destinationFieldDefinition = destFieldDefinitions.get(name);
            final FieldDefinition sourceFieldDefinition = sourceFieldDefinitions.get(name);
            if (destinationFieldDefinition != null) {
                startedDestMapping = true;
            }
            if (sourceFieldDefinition != null) {
                startedSourceMapping = true;
            }
            if (startedDestMapping && destinationFieldDefinition == null) {
                break;
            }
            //destination has fields before source definition starts. We default them to zero.
            if (!startedSourceMapping && destinationFieldDefinition != null) {
                mappings.put(name, returnOnZeroExpression(name));
            }
            //destination has fields after source definition was processed. We default them to always.
            if (startedSourceMapping && sourceFieldDefinition == null && destinationFieldDefinition != null) {
                mappings.put(name, returnAlwaysExpression(name));
            }
            if (sourceFieldDefinition == null || destinationFieldDefinition == null) {
                continue;
            }
            if (CronFieldName.DAY_OF_WEEK.equals(name)) {
                mappings.put(name, dayOfWeekMapping((DayOfWeekFieldDefinition) sourceFieldDefinition, (DayOfWeekFieldDefinition) destinationFieldDefinition));
            } else if (CronFieldName.DAY_OF_MONTH.equals(name)) {
                mappings.put(name, dayOfMonthMapping(sourceFieldDefinition, destinationFieldDefinition));
            } else {
                mappings.put(name, returnSameExpression());
            }
        }
    }
330065
public QueryBuilder<T, ID> leftJoinOr(QueryBuilder<?, ?> joinedQueryBuilder) throws SQLException {
		addJoinInfo(JoinType.LEFT, null, null, joinedQueryBuilder, JoinWhereOperation.OR);
		return this;
	}
582449
private static String initCreateRelationshipQuery(EntityKeyMetadata ownerEntityKeyMetadata, AssociationKeyMetadata associationKeyMetadata) {
		EntityKeyMetadata targetEntityKeyMetadata = associationKeyMetadata.getAssociatedEntityKeyMetadata().getEntityKeyMetadata();
		int offset = 0;
		StringBuilder queryBuilder = new StringBuilder( "MATCH " );
		appendEntityNode( "n", ownerEntityKeyMetadata, queryBuilder );
		queryBuilder.append( ", " );
		offset += ownerEntityKeyMetadata.getColumnNames().length;
		appendEntityNode( "t", targetEntityKeyMetadata, queryBuilder, offset );
		queryBuilder.append( " MERGE (n)" );
		queryBuilder.append( " -[r" );
		queryBuilder.append( ":" );
		appendRelationshipType( queryBuilder, associationKeyMetadata );
		offset = ownerEntityKeyMetadata.getColumnNames().length;
		if ( associationKeyMetadata.getRowKeyIndexColumnNames().length > 0 ) {
			offset += targetEntityKeyMetadata.getColumnNames().length;
			appendProperties( queryBuilder, associationKeyMetadata.getRowKeyIndexColumnNames(), offset );
		}
		queryBuilder.append( "]-> (t)" );
		queryBuilder.append( " RETURN r" );
		return queryBuilder.toString();
	}
560454
function joinOnce($table_or_column, $on_clause_or_column = null, $join_type = self::JOIN) {
		if ($table_or_column instanceof QueryJoin) {
			$join = clone $table_or_column;
		} else {
			if (null === $on_clause_or_column) {
				if ($join_type == self::JOIN || $join_type == self::INNER_JOIN) {
					foreach ($this->extraTables as &$table) {
						if ($table == $table_or_column) {
							return $this;
						}
					}
					$this->addTable($table_or_column);
					return $this;
				}
				$on_clause_or_column = '1 = 1';
			}
			$join = new QueryJoin($table_or_column, $on_clause_or_column, $join_type);
		}
		foreach ($this->joins as &$existing_join) {
			if ($join->getTable() == $existing_join->getTable()) {
				if ($join->getAlias() != $existing_join->getAlias()) {
					// tables match, but aliases don't match
					continue;
				}
				// tables match, and aliases match or there are no aliases
				return $this;
			}
		}
		$this->joins[] = $join;
		return $this;
	}
661563
public OqlBuilder<T> join(final String joinMode, final String path, final String alias) {
    from = concat(from, " ", joinMode, " join ", path, " ", alias);
    return this;
  }
918406
def query_hql(hql)
      logger.debug { "Building HQLCriteria..." }
      criteria = HQLCriteria.new(hql)
      target = hql[/from\s+(\S+)/i, 1]
      raise DatabaseError.new("HQL does not contain a FROM clause: #{hql}") unless target
      logger.debug { "Submitting search on target class #{target} with the following HQL:\n  #{hql}" }
      begin
        dispatch { |svc| svc.query(criteria, target) }
      rescue Exception => e
        logger.error("Error querying on HQL - #{$!}:\n#{hql}")
        raise e
      end
    end
338212
public static <T extends Comparable<? super T>> Predicates<T> betweenInclusiveFrom(T from, T to)
    {
        Predicates.failIfDifferentTypes(from, to);
        return new BetweenInclusiveFrom<T>(from, to);
    }