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 170
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 |
dispose() | Dispose the query object. |
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 138 |
Methods Details
buildQueryDefinition(overrides) Abstract | ||||||
---|---|---|---|---|---|---|
Builds the query definition Source: queries/BaseQuery.js, line 217
|
dispose() |
---|
Dispose the query object. Source: queries/BaseQuery.js, line 668 |
doQuery(successCallback, errorCallback) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Executes a server-side query. Source: queries/BaseQuery.js, line 268
|
exportData() Abstract |
---|
Exports the data represented by the query. Source: queries/BaseQuery.js, line 289 |
fetchData(params, successCallback, errorCallback) : Object | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fetches the data. Source: queries/BaseQuery.js, line 350
|
getErrorHandler(callback) : function | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the error callback handler that executes the provided callback when the query fails to execute. Source: queries/BaseQuery.js, line 253
|
getOption(prop) : Object | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets an option (fallback for when the OptionManager is not available). Source: queries/BaseQuery.js, line 183
|
getPage(targetPage, outsideCallback) : boolean | Object | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the set of results for the page at index Source: queries/BaseQuery.js, line 580
|
getSuccessHandler(callback) : function | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the success callback handler that executes the provided callback when the query executes successfully. Source: queries/BaseQuery.js, line 230
|
init(opts) Abstract | ||||||
---|---|---|---|---|---|---|
Initialization function. Source: queries/BaseQuery.js, line 206
|
initPage(pageSize, outsideCallback) : boolean | Object | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the page size and gets the first page of results. Source: queries/BaseQuery.js, line 652
|
lastProcessedResults() : Object | ||||||||
---|---|---|---|---|---|---|---|---|
Gets the last retrieved result after being processed by postFetch. Source: queries/BaseQuery.js, line 432
|
lastResults() : Object | ||||||||
---|---|---|---|---|---|---|---|---|
Gets the last retrieved result. Source: queries/BaseQuery.js, line 416
|
nextPage(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the next page of results, as controlled by the Source: queries/BaseQuery.js, line 534
|
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 624
|
previousPage(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the previous page of results, as controlled by the Source: queries/BaseQuery.js, line 555
|
reprocessLastResults(outerCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reruns the success callback on the last retrieved result set from the server. Source: queries/BaseQuery.js, line 449
See also: |
reprocessResults(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Alias for Source: queries/BaseQuery.js, line 474
See also: |
setAjaxOptions(newOptions) | ||||||
---|---|---|---|---|---|---|
Sets the jQuery.ajax options for the query. Source: queries/BaseQuery.js, line 299
|
setCallback(callback) | ||||||
---|---|---|---|---|---|---|
Sets the success callback for the query. Source: queries/BaseQuery.js, line 494
|
setErrorCallback(callback) | ||||||
---|---|---|---|---|---|---|
Sets the error callback for the query. Source: queries/BaseQuery.js, line 504
|
setOption(prop, value) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets an option (fallback for when the OptionManager is not available). Source: queries/BaseQuery.js, line 194
|
setPageSize(pageSize) | ||||||
---|---|---|---|---|---|---|
Sets the page size. Source: queries/BaseQuery.js, line 638
|
setPageStartingAt(targetPage) : boolean | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the starting page for later executions of the query. Source: queries/BaseQuery.js, line 602
|
setParameters(params) | ||||||
---|---|---|---|---|---|---|
Sets query parameters. Source: queries/BaseQuery.js, line 484
|
setSearchPattern(pattern) | ||||||
---|---|---|---|---|---|---|
Sets the search pattern for the query. Source: queries/BaseQuery.js, line 514
|
setSortBy(sortBy) Abstract | ||||||
---|---|---|---|---|---|---|
Sets the sorting options. Source: queries/BaseQuery.js, line 322
|
sortBy(sortBy, outsideCallback) Abstract | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sorts the data, specifying a callback that will be called after the sorting takes place. Source: queries/BaseQuery.js, line 334
|