根据条件查询若干个字段，加载到ENTITY里

@param matches
@param columns

@return
960954
protected List<ENTITY> findColumns(List<Match> matches, String[] columns) {

        Query query = queryGenerator.getMiniSelectQuery(Arrays.asList(columns), matches);
        return findBySQL(query.getSql(), query.getParams());
    }
157564
public static SqlPara select(ModelExt<?> model, String... columns) {
		return SqlpKit.select(model, FLAG.ALL, columns);
	}
1028119
public static DecomposableMatchBuilder1<String, String> caseString(MatchesAny s) {
    List<Matcher<Object>> matchers = new ArrayList<>();
    matchers.add(any());

    return new DecomposableMatchBuilder1<>(
        matchers, 0, new PrimitiveFieldExtractor<>(String.class));
  }
68296
public List<ENTITY> findExcludeColumns(Collection<String> excludeColumns, Match... matches) {
        Set<String> columns = orMapping.getAllColumns();
        for (String column : excludeColumns) {
            columns.remove(column);
        }
        return findIncludeColumns(columns, matches);
    }
125765
public Query<T> setColumnNames(Collection<N> columnNames) {
    if ( columnNames != null && columnNames.size() > 0) {
      slicePredicate.setColumnNames(columnNames);
    } else {
      slicePredicate.setKeysOnlyPredicate();
    }
    return this;
  }
509398
public <T> List<T> querySingleColumnTypedResults(String sql, String[] args,
			int column) {
		return db.querySingleColumnTypedResults(sql, args, column);
	}
399052
protected void appendExcludeSingleShardColumnEquals(StringBuilder sql, String[] columns, String separator, boolean updatePks, String excludeShardColumn) {
        int size = columns.length;
        for (int i = 0; i < size; i++) {
            // 如果是DRDS数据库, 并且存在拆分键 且 等于当前循环列, 跳过
            if(!updatePks && excludeShardColumn != null && columns[i].equals(excludeShardColumn)){
                continue;
            }
            sql.append(" ").append(appendEscape(columns[i])).append(" = ").append("? ");
            if (i != size - 1) {
                sql.append(separator);
            }
        }
    }
1185610
private Map<String, Integer> createMapOfColumnIndex(String[] columns)
    {
        int i = 0;
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String column : columns)
        {
            map.put(column, i++);
        }
        return map;
    }
988742
public List<ENTITY> find(List<Match> matches, List<Order> order) {
        return find(matches, order, 0, 0);
    }
609316
@SafeVarargs
  public final TableBuilder columns(String... columns) {
    if (columns == null || columns.length == 0) {
      throw new InvalidOperationException("Columns array is null or empty.");
    }
    if (tableColumns != null) {
      throw new InvalidOperationException("The table columns are already defined.");
    }
    tableColumns = columns.clone();
    return this;
  }
11473
function columnsToSQL(columns, tables) {
  if (!columns) return
  const baseTable = Array.isArray(tables) && tables[0]
  let isDual = false
  if (baseTable && baseTable.type === 'dual') isDual = true
  return columns
    .map(column => {
      const { expr } = column
      if (isDual) expr.isDual = isDual
      let str = exprToSQL(expr)
      if (column.as !== null) {
        str = `${str} AS `
        if (column.as.match(/^[a-z_][0-9a-z_]*$/i)) str = `${str}${identifierToSql(column.as)}`

        else str = `${str}\`${column.as}\``
      }

      return str
    })
    .join(', ')
}
122908
public int delete(Match... matches) {
        Query query = queryGenerator.getDeleteQuery(matches);

        // 执行操作
        return executeSQL(query.getSql(), query.getParams());
    }
811955
protected EofMatch findEof(Match matches[]) {
        EofMatch ourEof = null;
        for (int i = 0; i < matches.length; i++) {
            if (matches[i] instanceof EofMatch)
                ourEof = (EofMatch) matches[i];
        }

        if (ourEof == null) {
            // Have to create our own
            ourEof = new EofMatch();
        }

        return ourEof;
    }
225680
private <E> List<E> findAllColumns(Class<E> entityClass, byte[][] columns, Object... keys)
    {
        Object connection = getConnection();
        // connection.co
        List results = new ArrayList();
        try
        {
            for (Object key : keys)
            {
                Object result = fetch(entityClass, key, connection, columns);
                if (result != null)
                {
                    results.add(result);
                }
            }
        }
        catch (InstantiationException e)
        {
            logger.error("Error during find by key:", e);
            throw new PersistenceException(e);
        }
        catch (IllegalAccessException e)
        {
            logger.error("Error during find by key:", e);
            throw new PersistenceException(e);
        }
        return results;
    }
779957
@Override
    public final <E> List<E> findAll(Class<E> entityClass, String[] columnsToSelect, Object... rowIds) {
        // TODO: need to think about selected column case.
        // Bring in IN Clause in place of each read.

        List results = new ArrayList<E>();
        if (rowIds != null) {
            for (Object rowId : rowIds) {
                Object result = find(entityClass, rowId);
                if (result != null) {
                    results.add(result);
                }
            }
        }
        return results;
    }
844495
public static Matcher<String> containsStrings(String... strings) {
        List<Matcher<? super String>> matchers = new ArrayList<Matcher<? super String>>();
        for (String string : strings) {
            matchers.add(containsString(string));
        }
        return allOf(matchers);
    }
495877
protected void appendColumns (Iterable<String> columns, StringBuilder buf) {
        int ii = 0;
        for (String column : columns) {
            if (ii++ > 0) {
                buf.append(", ");
            }
            buf.append(columnSQL(column));
        }
    }