Class: QueryResults

Oracle.BDD.Portlets.Visualization.Model. QueryResults

new QueryResults()

Do NOT instantiate this class directly. QueryResults are provided as an argument to the callback function of Oracle.BDD.Portlets.Visualization.Renderers.BaseRenderer#executeQuery

For example:

    init: function() {
      
       this.executeQuery("eql", true, this.renderVisualization);

    },
  
   renderVisualization: function(queryResults) {

       var records = queryResults.getRecords();
       var queryConfig = queryResults.getQueryConfig();
       
        ...
   }
Source:

Methods

getQueryConfig() → {QueryConfig}

Returns the Oracle.BDD.Portlets.Visualization.Model.QueryConfig that prompted the query response
Source:
Returns:
The QueryConfig object
Type
QueryConfig

getRecordCount() → {Number}

Gets the number of records returned in the query
Source:
Returns:
Record count
Type
Number

getRecords() → {Array.<Object>}

Returns an array of data records returned by the query. The structure of a data record is dependent upon on EQL of the query executed.

For example, the eql query:

RETURN data AS
SELECT
COALESCE(%metric_1%, 0) as metric_1,
COALESCE(%metric_2%, 0) as metric_2,
%groupby_1% AS groupby_1
FROM "%dataview%"
GROUP BY groupby_1

returns:

[{metric_1: 12.0, metric_2: 35.5, groupby_1: "Alaska"}, 
{metric_1: 18.2, metric_2: 22.8, groupby_1: "Arizona"}, ...]
Source:
Returns:
An array of data records return by the query
Type
Array.<Object>

getTotalRecordCount() → {Number}

Gets the total number of records in the query. This may exceed the number returned by getRecordCount() if the EQL had a paging statement or if the number of records returned by the query exceeded the maximum number of records allowed by the portlet (i.e. 1000).
Source:
Returns:
Total record count
Type
Number