<p>
Returns the results for the SQL query.
</p>

@return Returns the results for the SQL query.
771531
public java.util.List<String> getResults() {
        if (results == null) {
            results = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return results;
    }
147793
public function fetchResult()
    {
        if ($this->checkValid()) {
            try {
                return $this->getAdapter()->fetchAssoc($this->resultSQL);
            } catch (Exception $e) {
                $e->log();
            }
        }

        return false;
    }
766480
protected String[] getKeysFromResultSet()
            throws SQLException {

        String[] keys = super.getKeysFromResultSet();

        // check schemaProperty mapping names for more accurate column->field mapping
        SchemaProperty[] props = _schemaType.getElementProperties();
        for (int i = 0; i < props.length; i++) {

            int col = -1;
            try {
                col = _resultSet.findColumn(props[i].getName().getLocalPart());
            } catch (SQLException x) {
            }

            if (col > 0) {
                keys[col] = props[i].getJavaPropertyName().toUpperCase();
            }
        }
        return keys;
    }
110549
private void getResultSetMappings() throws SQLException {

        //
        // special case for XmlObject, find factory class
        //
        if (_schemaType.isDocumentType()) {
            return;
        }

        final String[] keys = getKeysFromResultSet();

        //
        // find setters for return class
        //
        HashMap<String, Method> mapFields = new HashMap<String, Method>(_columnCount * 2);
        for (int i = 1; i <= _columnCount; i++) {
            mapFields.put(keys[i], null);
        }

        // public methods
        Method[] classMethods = _returnTypeClass.getMethods();
        for (Method method : classMethods) {

            if (isSetterMethod(method)) {
                final String fieldName = method.getName().substring(3).toUpperCase();
                if (mapFields.containsKey(fieldName)) {
                    mapFields.put(fieldName, method);
                }
            }
        }

        // finally actually init the fields array
        _setterMethods = new SetterMethod[_columnCount + 1];

        for (int i = 1; i < _setterMethods.length; i++) {
            Method setterMethod = mapFields.get(keys[i]);
            if (setterMethod == null) {
                throw new ControlException("Unable to map the SQL column " + keys[i]
                                           + " to a field on the " + _returnTypeClass.getName() +
                                           " class. Mapping is done using a case insensitive comparision of SQL ResultSet "
                                           + "columns to public setter methods on the return class.");
            }

            _setterMethods[i] = new SetterMethod(setterMethod);
        }
    }
993427
@Override
  public String getSqlWithValues() {
    final StringBuilder sb = new StringBuilder();
    final String statementQuery = getStatementQuery();

    // iterate over the characters in the query replacing the parameter placeholders
    // with the actual values
    int currentParameter = 0;
    for( int pos = 0; pos < statementQuery.length(); pos ++) {
      char character = statementQuery.charAt(pos);
      if( statementQuery.charAt(pos) == '?' && currentParameter <= parameterValues.size()) {
        // replace with parameter value
        Value value = parameterValues.get(currentParameter);
        sb.append(value != null ? value.toString() : new Value().toString());
        currentParameter++;
      } else {
        sb.append(character);
      }
    }

    return sb.toString();
  }
807815
public static List<Map<String, Object>> queryForList(String sql, Object... args) {
		List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
		Connection con = null;
		ResultSet rs = null;
		PreparedStatement ps = null;
		try {
			con = getconnnection();
			ps = con.prepareStatement(sql);
			if (args != null) {
				for (int i = 0; i < args.length; i++) {
					ps.setObject((i + 1), args[i]);
				}
			}
			rs = ps.executeQuery();
			ResultSetMetaData rsmd = rs.getMetaData();
			int columnCount = rsmd.getColumnCount();
			while (rs.next()) {
				Map<String, Object> map = new HashMap<String, Object>();
				for (int i = 1; i <= columnCount; i++) {
					map.put(rsmd.getColumnLabel(i), rs.getObject(i));
				}
				result.add(map);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			close(rs, ps, con);
		}
		return result;
	}
691573
@Nullable
    public T query() throws SQLException {
        try (ResultSet r = executeQuery()) {
            if (r.next()) {
                return resultMapper.map(r);
            }
            return null;
        }
    }
1106856
public static String execQueryAllRows(@NotNull final SQLInputs sqlInputs) throws Exception {
        ConnectionService connectionService = new ConnectionService();
        try (final Connection connection = connectionService.setUpConnection(sqlInputs)) {
            connection.setReadOnly(true);

            Statement statement = connection.createStatement(sqlInputs.getResultSetType(), sqlInputs.getResultSetConcurrency());

            statement.setQueryTimeout(sqlInputs.getTimeout());
            final ResultSet resultSet = statement.executeQuery(sqlInputs.getSqlCommand());

            final String resultSetToDelimitedColsAndRows = Format.resultSetToDelimitedColsAndRows(resultSet, sqlInputs.isNetcool(), sqlInputs.getColDelimiter(), sqlInputs.getRowDelimiter());
            if (resultSet != null) {
                resultSet.close();
            }
            return resultSetToDelimitedColsAndRows;
        }
    }
33930
public function getResults()
	{
		if (!isset($this->resultset))
		{
			$this->run();
		}

		$documents = array();
		foreach ($this->resultset as $document)
		{
			array_push($documents, $document);
		}

		foreach ($documents as &$document)
		{
			$document = $document->getFields();
		}

		return $documents;
	}
641282
public String query(String query) {
        try {
            Connection conn = this.tx().getConnection();
            ObjectNode result = this.mapper.createObjectNode();
            ArrayNode dataNode = this.mapper.createArrayNode();
            ArrayNode metaNode = this.mapper.createArrayNode();
            Statement statement = conn.createStatement();
            if (logger.isDebugEnabled()) {
                logger.debug(query);
            }
            ResultSet rs = statement.executeQuery(query);
            ResultSetMetaData rsmd = rs.getMetaData();
            boolean first = true;
            while (rs.next()) {
                int numColumns = rsmd.getColumnCount();
                ObjectNode obj = this.mapper.createObjectNode();
                for (int i = 1; i < numColumns + 1; i++) {
                    String columnName = rsmd.getColumnLabel(i);
                    int type = rsmd.getColumnType(i);
                    //make sure to obtain array using getArray()
                    //At least in H2, this makes a difference...
                    Object o = type == Types.ARRAY ? rs.getArray(i) : rs.getObject(i);
                    this.sqlDialect.putJsonObject(obj, columnName, type, o);
                    if (first) {
                        this.sqlDialect.putJsonMetaObject(this.mapper, metaNode, columnName, type, o);
                    }
                }
                first = false;
                dataNode.add(obj);
            }
            result.set("data", dataNode);
            result.set("meta", metaNode);
            return result.toString();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        } finally {
            this.tx().rollback();
        }
    }
344456
public java.util.List<EvaluationResult> getEvaluationResults() {
        if (evaluationResults == null) {
            evaluationResults = new com.amazonaws.internal.SdkInternalList<EvaluationResult>();
        }
        return evaluationResults;
    }
782554
protected function getQueryResultRow()
    {
        if ($this->fetchedResults === null) {
            $this->fetchedResults = $this
                ->getQueryResult()
                ->fetchAll();
        }

        return array_shift($this->fetchedResults);
    }
125187
public List<SqlResultSetMapping<EntityMappings<T>>> getAllSqlResultSetMapping()
   {
      List<SqlResultSetMapping<EntityMappings<T>>> list = new ArrayList<SqlResultSetMapping<EntityMappings<T>>>();
      List<Node> nodeList = childNode.get("sql-result-set-mapping");
      for(Node node: nodeList)
      {
         SqlResultSetMapping<EntityMappings<T>>  type = new SqlResultSetMappingImpl<EntityMappings<T>>(this, "sql-result-set-mapping", childNode, node);
         list.add(type);
      }
      return list;
   }
1164136
protected String getCountQuery() {
    
    if(dbConf.getInputCountQuery() != null) {
      return dbConf.getInputCountQuery();
    }
    
    StringBuilder query = new StringBuilder();
    query.append("SELECT COUNT(*) FROM " + tableName);

    if (conditions != null && conditions.length() > 0)
      query.append(" WHERE " + conditions);
    return query.toString();
  }
415010
public List<String> getTables() throws SQLException {
		List<Contents> contents = queryForAll();
		List<String> tableNames = new ArrayList<String>();
		for (Contents content : contents) {
			tableNames.add(content.getTableName());
		}
		return tableNames;
	}
786171
public FeatureIndexResults query() {
		FeatureIndexResults results = null;
		switch (getIndexedType()) {
		case GEOPACKAGE:
			long count = featureTableIndex.count();
			CloseableIterator<GeometryIndex> geometryIndices = featureTableIndex
					.query();
			results = new FeatureIndexGeoPackageResults(featureTableIndex,
					count, geometryIndices);
			break;
		case RTREE:
			UserCustomResultSet resultSet = rTreeIndexTableDao.queryForAll();
			results = new FeatureIndexRTreeResults(rTreeIndexTableDao,
					resultSet);
			break;
		default:
			FeatureResultSet featureResultSet = featureDao.queryForAll();
			results = new FeatureIndexFeatureResults(featureResultSet);
		}
		return results;
	}
595497
@Override
    public ResultSet getTableTypes() throws SQLException
    {
        checkClosed();
        VoltTable vtable = new VoltTable(new ColumnInfo("TABLE_TYPE", VoltType.STRING));
        for (String type : tableTypes) {
            vtable.addRow(type);
        }
        JDBC4ResultSet res = new JDBC4ResultSet(this.sysCatalog, vtable);
        return res;
    }