Query for typed values from a single column

@param <T>
result value type
@param sql
sql statement
@param args
arguments
@param column
column index
@return single column results
@since 3.1.0
509398
public <T> List<T> querySingleColumnTypedResults(String sql, String[] args,
			int column) {
		return db.querySingleColumnTypedResults(sql, args, column);
	}
688188
public <T> T queryColumn(String sql, Object... paras) {
		List<T> result = query(sql, paras);
		if (result.size() > 0) {
			T temp = result.get(0);
			if (temp instanceof Object[])
				throw new ActiveRecordException("Only ONE COLUMN can be queried.");
			return temp;
		}
		return null;
	}
253879
public <S> List<S> queryList(Class<S> type, String sql, Object[] params) {
        Connection conn = getConn();
        try {
            return conn.createQuery(sql)
                    .withParams(params)
                    .setColumnMappings(computeModelColumnMappings(type))
                    .throwOnMappingFailure(false)
                    .executeAndFetch(type);
        } finally {
            this.closeConn(conn);
            this.clean(null);
        }
    }
1226626
public <T> T querySingleTypedResult(String sql, String[] args) {
		@SuppressWarnings("unchecked")
		T result = (T) querySingleResult(sql, args);
		return result;
	}
950890
public void find(ResultStream<Cursor> result, String sql, Object ...args)
  {
    _kraken.findStream(sql, args, result);
  }
920789
public void map(MethodRef method, String sql, Object []args)
  {
    QueryBuilderKraken builder = QueryParserKraken.parse(this, sql);
    
    if (builder.isTableLoaded()) {
      QueryKraken query = builder.build(); 
      
      query.map(method, args);
    }
    else {
      String tableName = builder.getTableName();
      
      _tableService.loadTable(tableName,
                              Result.of(t->builder.build().map(method, args)));
    }
  }
1087748
protected int jdbcExecuteUpdate(String sql, Object... args) {
		log(sql);
		long start = System.currentTimeMillis();
		int rows = jdbcTemplate.update(sql.toString(), args);// 此处可以用jdbcTemplate，因为没有in (?)表达式
		long cost = System.currentTimeMillis() - start;
		logSlow(cost, sql, args == null ? new ArrayList<Object>() : Arrays.asList(args));
		return rows;
	}
990334
public AnimaQuery<T> in(String column, Object... args) {
        if (null == args || args.length == 0) {
            log.warn("Column: {}, query params is empty.");
            return this;
        }
        conditionSQL.append(" AND ").append(column).append(" IN (");
        this.setArguments(args);
        conditionSQL.append(")");
        return this;
    }
736585
@Override
  public void exec(Result<Object> result, Object[] args)
  {
    TableKelp tableKelp = _table.getTableKelp();
    
    RowCursor minCursor = tableKelp.cursor();
    RowCursor maxCursor = tableKelp.cursor();
    
    minCursor.clear();
    maxCursor.setKeyMax();
    
    _whereKraken.fillMinCursor(minCursor, args);
    _whereKraken.fillMaxCursor(minCursor, args);
    
    //QueryKelp whereKelp = _whereExpr.bind(args);
    // XXX: binding should be with unique
    EnvKelp whereKelp = new EnvKelp(_whereKelp, args);
    
    //tableKelp.findOne(minCursor, maxCursor, whereKelp,
    //                  new FindDeleteResult(result));
    
    _table.notifyOwner(minCursor.getKey());
    
    // result.completed(null);
    
    result.ok(null);
  }
1011258
public static Map<String, Object> getMap(String sql, Object... arg) {
        List<Map<String, Object>> list = DBUtils.getListMap(sql, arg);
        if (list.isEmpty()) {
            return null;
        }
        return list.get(0);
    }
874597
public <T> T querySingleTypedResult(String sql, String[] args, int column) {
		return db.querySingleTypedResult(sql, args, column);
	}
150208
public List<Object> querySingleColumnResults(String sql, String[] args,
			int column) {
		return db.querySingleColumnResults(sql, args, column);
	}
88594
public static List<List<Object>> queryResults(Connection connection,
			String sql, String[] args, GeoPackageDataType[] dataTypes,
			Integer limit) {
		ResultSetResult result = wrapQuery(connection, sql, args);
		List<List<Object>> results = ResultUtils.buildResults(result,
				dataTypes, limit);
		return results;
	}
1251055
public static Integer max(Connection connection, String table,
			String column, String where, String[] args) {

		Integer max = null;
		if (count(connection, table, where, args) > 0) {
			StringBuilder maxQuery = new StringBuilder();
			maxQuery.append("select max(")
					.append(CoreSQLUtils.quoteWrap(column)).append(") from ")
					.append(CoreSQLUtils.quoteWrap(table));
			if (where != null) {
				maxQuery.append(" where ").append(where);
			}
			String sql = maxQuery.toString();

			max = querySingleInteger(connection, sql, args, false);
		}

		return max;
	}
302895
public void findAllLocal(String sql, Object []args, Result<Iterable<Cursor>> result)
  {
    QueryBuilderKraken builder = QueryParserKraken.parse(this, sql);
    
    QueryKraken query = builder.build(); 
      
    TableKraken table = query.table();
    TableKelp tableKelp = table.getTableKelp();

    RowCursor cursor = tableKelp.cursor();

    query.fillKey(cursor, args);
    
    query.findAllLocal(result, args);
  }
490338
public Integer max(String column, String where, String[] args) {
		return db.max(getTableName(), column, where, args);
	}
453077
public <T> List<T> selectList(String sql, Object value, Class<T> resultType) {
        String msId;
        Class<?> parameterType = value != null ? value.getClass() : null;
        if (resultType == null) {
            msId = msUtils.selectDynamic(sql, parameterType);
        } else {
            msId = msUtils.selectDynamic(sql, parameterType, resultType);
        }
        return sqlSession.selectList(msId, value);
    }