from.

@param entityName a {@link java.lang.String} object.
@param alias a {@link java.lang.String} object.
@param <E> a E object.
@return a {@link org.beangle.commons.dao.query.builder.OqlBuilder} object.
337679
@SuppressWarnings("unchecked")
  public static <E> OqlBuilder<E> from(final String entityName, final String alias) {
    EntityType type = Model.getType(entityName);
    OqlBuilder<E> query = new OqlBuilder<E>();
    if (null != type) query.entityClass = (Class<E>) type.getEntityClass();
    query.alias = alias;
    query.select = "select " + alias;
    query.from = concat("from ", entityName, " ", alias);
    return query;
  }
1193696
public static function table(string $tableName, string $alias = null): QueryBuilder
    {
        $query = new QueryBuilder();
        $query = $query->table($tableName, $alias);

        return $query;
    }
367264
public String resolveAliasType(String alias) {
        String type = getAliasedType(alias);
        return (type == null ? alias: type);
    }
466681
@SuppressWarnings("deprecation")
    public CQLBuilder set(final Object entity, final Set<String> excludedPropNames) {
        if (entity instanceof String) {
            return set(N.asArray((String) entity));
        } else if (entity instanceof Map) {
            if (N.isNullOrEmpty(excludedPropNames)) {
                return set((Map<String, Object>) entity);
            } else {
                final Map<String, Object> props = new LinkedHashMap<>((Map<String, Object>) entity);
                Maps.removeKeys(props, excludedPropNames);
                return set(props);
            }
        } else {
            this.entityClass = entity.getClass();

            if (N.isDirtyMarker(entity.getClass())) {
                final Map<String, Object> props = new HashMap<>();

                for (String propName : ((DirtyMarker) entity).dirtyPropNames()) {
                    props.put(propName, ClassUtil.getPropValue(entity, propName));
                }

                Maps.removeKeys(props, excludedPropNames);

                return set(props);
            } else {
                return set(N.isNullOrEmpty(excludedPropNames) ? Maps.entity2Map(entity) : Maps.entity2Map(entity, excludedPropNames));
            }
        }
    }
882880
public QueryRequestBuilder<T,ID> query(QueryExpression query)
    {
        return new QueryRequestBuilder<T, ID>(version,type,entityName,query.build());
    }
1183678
public function createQueryBuilder($alias, $indexBy = null) {
        return $this->getEntityManager()->createQueryBuilder()
            ->select($alias)
            ->from($this->getEntityName(), $alias, $indexBy);
    }
554146
public <T> JDOQuery<T> selectFrom(EntityPath<T> expr) {
        return select(expr).from(expr);
    }
770892
protected EbeanQueryWrapper createEbeanQuery(String queryString) {
        EbeanServer ebeanServer = getEbeanServer();

        ResultProcessor resultFactory = getQueryMethod().getResultProcessor();
        ReturnedType returnedType = resultFactory.getReturnedType();

        return EbeanQueryWrapper.ofEbeanQuery(ebeanServer.createQuery(returnedType.getReturnedType(), queryString));
    }
445548
public org.grails.datastore.mapping.query.api.ProjectionList sum(String propertyName, String alias) {
        final AggregateProjection proj = Projections.sum(calculatePropertyName(propertyName));
        addProjectionToList(proj, alias);
        return this;
    }
1096830
public function createJobQueryBuilder($alias)
    {
        return $this->getEntityManager()
            ->createQueryBuilder()
            ->select($alias)
            ->from($this->entityClass, $alias);
    }
1347391
public Expression<T> as(String alias) {
        return as(ExpressionUtils.path(getType(), alias));
    }
1126230
public static <A> CollQuery<A> from(A alias, Iterable<A> col) {
        Path<A> expr = Alias.$(alias);
        return new CollQuery<Void>().from(expr, col).select(expr);
    }
742609
public SqlBuilder join(final String joinMode, final String path, final String alias) {
    from += " " + joinMode + " join " + path + " " + alias;
    return this;
  }
134622
public static <D> SimpleExpression<D> as(Expression<D> source, Path<D> alias) {
        if (source == null) {
            return as(Expressions.<D>nullExpression(), alias);
        } else {
            return operation(alias.getType(), Ops.ALIAS, source, alias);
        }
    }
682549
public QueryBuilder fromAllNodesAs( String alias ) {
        AllNodes allNodes = new AllNodes(selector(alias));
        SelectorName oldName = this.source instanceof Selector ? ((Selector)source).name() : null;
        // Go through the columns and change the selector name to use the new alias ...
        for (int i = 0; i != columns.size(); ++i) {
            Column old = columns.get(i);
            if (old.selectorName().equals(oldName)) {
                columns.set(i, new Column(allNodes.aliasOrName(), old.getPropertyName(), old.getColumnName()));
            }
        }
        this.source = allNodes;
        return this;
    }
572426
public static List<Condition> extractConditions(String alias, final Entity<?> entity) {
    if (null == entity) { return Collections.emptyList(); }
    final List<Condition> conditions = new ArrayList<Condition>();

    StringBuilder aliasBuilder = new StringBuilder(alias == null ? "" : alias);
    if (aliasBuilder.length() > 0 && !alias.endsWith(".")) aliasBuilder.append(".");
    alias = aliasBuilder.toString();
    String attr = "";
    try {
      final Set<String> props = PropertyUtils.getWritableProperties(entity.getClass());
      for (final Iterator<String> iter = props.iterator(); iter.hasNext();) {
        attr = iter.next();
        final Object value = PropertyUtils.getProperty(entity, attr);
        if (null == value) continue;
        if (!(value instanceof Collection<?>)) addAttrCondition(conditions, alias + attr, value);
      }
    } catch (Exception e) {
      logger.debug("error occur in extractConditions for  bean {} with attr named {}", entity, attr);
    }
    return conditions;
  }
489847
public static <T> JoinerQuery<T, T> from(EntityPath<T> from) {
        return new JoinerQueryBase<>(from, from);
    }