BaseQuery
cdf.queries. BaseQuery
Defines the base query type used by default by any dashboard.
While loading this class's module, the static function setBaseQuery
is executed in order to make this class the default base query class for any dashboard.
Additional query types might extend from this class, if no valid constructor is provided during the new query type registration.
Please use the dashboard function getQuery
to create new queries.
Source: queries/BaseQuery.js, line 169
Members
Name | Description |
---|---|
_label : Constant Protected | The class label. |
_name : Constant Protected | The class name. |
dashboard : Protected | A reference to the dashboard instance. |
deepProperties : Constant Protected | A list of properties to be extended to the registered queries. |
defaults : Protected | The default properties. |
interfaces : Protected | The default interfaces. |
Methods
Name | Description |
---|---|
buildQueryDefinition(overrides) Abstract | Builds the query definition |
doQuery(successCallback, errorCallback) | Executes a server-side query. |
exportData() Abstract | Exports the data represented by the query. |
fetchData(params, successCallback, errorCallback) : Object | Fetches the data. |
getErrorHandler(callback) : function | Gets the error callback handler. |
getOption(prop) : Object | Gets an option (fallback for when the OptionManager is not available). |
getPage(targetPage, outsideCallback) : boolean | Object | Gets the set of results for the page at index |
getSuccessHandler(callback) : function | Gets the success callback handler. |
init(opts) Abstract | Initialization function. |
initPage(pageSize, outsideCallback) : boolean | Object | Sets the page size and gets the first page of results. |
lastProcessedResults() : Object | Gets the last retrieved result after being processed by postFetch. |
lastResults() : Object | Gets the last retrieved result. |
nextPage(outsideCallback) : Object | Gets the next page of results, as controlled by the |
pageStartingAt(page, outsideCallback) : boolean | Object | Runs the query, setting a starting page before doing so. |
previousPage(outsideCallback) : Object | Gets the previous page of results, as controlled by the |
reprocessLastResults(outerCallback) : Object | Reruns the success callback on the last retrieved result set from the server. |
reprocessResults(outsideCallback) : Object | Alias for |
setAjaxOptions(newOptions) | Sets the jQuery.ajax options for the query. |
setCallback(callback) | Sets the success callback for the query. |
setErrorCallback(callback) | Sets the error callback for the query. |
setOption(prop, value) | Sets an option (fallback for when the OptionManager is not available). |
setPageSize(pageSize) | Sets the page size. |
setPageStartingAt(targetPage) : boolean | Sets the starting page for later executions of the query. |
setParameters(params) | Sets query parameters. |
setSearchPattern(pattern) | Sets the search pattern for the query. |
setSortBy(sortBy) Abstract | Sets the sorting options. |
sortBy(sortBy, outsideCallback) Abstract | Sorts the data and executes a callback. |
Members Details
_label: Constant Protected |
---|
The class label. Source: queries/BaseQuery.js, line 50 Default Value: "Base Query" |
_name: Constant Protected |
---|
The class name. Source: queries/BaseQuery.js, line 35 Default Value: "baseQuery" |
dashboard: Protected |
---|
A reference to the dashboard instance. Source: queries/BaseQuery.js, line 76 |
deepProperties: Constant Protected |
---|
A list of properties to be extended to the registered queries that do not provide their own constructor function. Source: queries/BaseQuery.js, line 67 Default Value: See also: |
defaults: Protected | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The default properties.
Source: queries/BaseQuery.js, line 94 |
interfaces: Protected | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The default interfaces.
Source: queries/BaseQuery.js, line 137 |
Methods Details
buildQueryDefinition(overrides) Abstract | ||||||
---|---|---|---|---|---|---|
Builds the query definition Source: queries/BaseQuery.js, line 216
|
doQuery(successCallback, errorCallback) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Executes a server-side query. Source: queries/BaseQuery.js, line 267
|
exportData() Abstract |
---|
Exports the data represented by the query. Source: queries/BaseQuery.js, line 288 |
fetchData(params, successCallback, errorCallback) : Object | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fetches the data. Source: queries/BaseQuery.js, line 349
|
getErrorHandler(callback) : function | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the error callback handler that executes the provided callback when the query fails to execute. Source: queries/BaseQuery.js, line 252
|
getOption(prop) : Object | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets an option (fallback for when the OptionManager is not available). Source: queries/BaseQuery.js, line 182
|
getPage(targetPage, outsideCallback) : boolean | Object | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the set of results for the page at index Source: queries/BaseQuery.js, line 579
|
getSuccessHandler(callback) : function | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the success callback handler that executes the provided callback when the query executes successfully. Source: queries/BaseQuery.js, line 229
|
init(opts) Abstract | ||||||
---|---|---|---|---|---|---|
Initialization function. Source: queries/BaseQuery.js, line 205
|
initPage(pageSize, outsideCallback) : boolean | Object | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the page size and gets the first page of results. Source: queries/BaseQuery.js, line 651
|
lastProcessedResults() : Object | ||||||||
---|---|---|---|---|---|---|---|---|
Gets the last retrieved result after being processed by postFetch. Source: queries/BaseQuery.js, line 431
|
lastResults() : Object | ||||||||
---|---|---|---|---|---|---|---|---|
Gets the last retrieved result. Source: queries/BaseQuery.js, line 415
|
nextPage(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the next page of results, as controlled by the Source: queries/BaseQuery.js, line 533
|
pageStartingAt(page, outsideCallback) : boolean | Object | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Runs the query, setting a starting page before doing so. If the starting page matches the already selected one, the query run is canceled and Source: queries/BaseQuery.js, line 623
|
previousPage(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the previous page of results, as controlled by the Source: queries/BaseQuery.js, line 554
|
reprocessLastResults(outerCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reruns the success callback on the last retrieved result set from the server. Source: queries/BaseQuery.js, line 448
See also: |
reprocessResults(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Alias for Source: queries/BaseQuery.js, line 473
See also: |
setAjaxOptions(newOptions) | ||||||
---|---|---|---|---|---|---|
Sets the jQuery.ajax options for the query. Source: queries/BaseQuery.js, line 298
|
setCallback(callback) | ||||||
---|---|---|---|---|---|---|
Sets the success callback for the query. Source: queries/BaseQuery.js, line 493
|
setErrorCallback(callback) | ||||||
---|---|---|---|---|---|---|
Sets the error callback for the query. Source: queries/BaseQuery.js, line 503
|
setOption(prop, value) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets an option (fallback for when the OptionManager is not available). Source: queries/BaseQuery.js, line 193
|
setPageSize(pageSize) | ||||||
---|---|---|---|---|---|---|
Sets the page size. Source: queries/BaseQuery.js, line 637
|
setPageStartingAt(targetPage) : boolean | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the starting page for later executions of the query. Source: queries/BaseQuery.js, line 601
|
setParameters(params) | ||||||
---|---|---|---|---|---|---|
Sets query parameters. Source: queries/BaseQuery.js, line 483
|
setSearchPattern(pattern) | ||||||
---|---|---|---|---|---|---|
Sets the search pattern for the query. Source: queries/BaseQuery.js, line 513
|
setSortBy(sortBy) Abstract | ||||||
---|---|---|---|---|---|---|
Sets the sorting options. Source: queries/BaseQuery.js, line 321
|
sortBy(sortBy, outsideCallback) Abstract | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sorts the data, specifying a callback that will be called after the sorting takes place. Source: queries/BaseQuery.js, line 333
|