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 159
Members
Name | Description |
---|---|
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. |
label : Constant Protected | The class label. |
name : Constant Protected | The class name. |
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
dashboard: Protected |
---|
A reference to the dashboard instance. Source: queries/BaseQuery.js, line 69 |
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 60 Default Value: See also: |
defaults: Protected | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The default properties.
Source: queries/BaseQuery.js, line 87 |
interfaces: Protected | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The default interfaces.
Source: queries/BaseQuery.js, line 127 |
label: Constant Protected |
---|
The class label. Source: queries/BaseQuery.js, line 46 Default Value: "Base Query" |
name: Constant Protected |
---|
The class name. Source: queries/BaseQuery.js, line 34 Default Value: "baseQuery" |
Methods Details
buildQueryDefinition(overrides) Abstract | ||||||
---|---|---|---|---|---|---|
Builds the query definition Source: queries/BaseQuery.js, line 206
|
doQuery(successCallback, errorCallback) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Executes a server-side query. Source: queries/BaseQuery.js, line 257
|
exportData() Abstract |
---|
Exports the data represented by the query. Source: queries/BaseQuery.js, line 284 |
fetchData(params, successCallback, errorCallback) : Object | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fetches the data. Source: queries/BaseQuery.js, line 331
|
getErrorHandler(callback) : function | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the error callback handler that executes the provided callback when the query fails to execute. Source: queries/BaseQuery.js, line 242
|
getOption(prop) : Object | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets an option (fallback for when the OptionManager is not available). Source: queries/BaseQuery.js, line 172
|
getPage(targetPage, outsideCallback) : boolean | Object | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the set of results for the page at index Source: queries/BaseQuery.js, line 550
|
getSuccessHandler(callback) : function | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the success callback handler that executes the provided callback when the query executes successfully. Source: queries/BaseQuery.js, line 219
|
init(opts) Abstract | ||||||
---|---|---|---|---|---|---|
Initialization function. Source: queries/BaseQuery.js, line 195
|
initPage(pageSize, outsideCallback) : boolean | Object | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the page size and gets the first page of results. Source: queries/BaseQuery.js, line 622
|
lastProcessedResults() : Object | ||||||||
---|---|---|---|---|---|---|---|---|
Gets the last retrieved result after being processed by postFetch. Source: queries/BaseQuery.js, line 402
|
lastResults() : Object | ||||||||
---|---|---|---|---|---|---|---|---|
Gets the last retrieved result. Source: queries/BaseQuery.js, line 386
|
nextPage(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the next page of results, as controlled by the Source: queries/BaseQuery.js, line 504
|
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 594
|
previousPage(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the previous page of results, as controlled by the Source: queries/BaseQuery.js, line 525
|
reprocessLastResults(outerCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reruns the success callback on the last retrieved result set from the server. Source: queries/BaseQuery.js, line 419
See also: |
reprocessResults(outsideCallback) : Object | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Alias for Source: queries/BaseQuery.js, line 444
See also: |
setAjaxOptions(newOptions) | ||||||
---|---|---|---|---|---|---|
Sets the jQuery.ajax options for the query. Source: queries/BaseQuery.js, line 294
|
setCallback(callback) | ||||||
---|---|---|---|---|---|---|
Sets the success callback for the query. Source: queries/BaseQuery.js, line 464
|
setErrorCallback(callback) | ||||||
---|---|---|---|---|---|---|
Sets the error callback for the query. Source: queries/BaseQuery.js, line 474
|
setOption(prop, value) | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets an option (fallback for when the OptionManager is not available). Source: queries/BaseQuery.js, line 183
|
setPageSize(pageSize) | ||||||
---|---|---|---|---|---|---|
Sets the page size. Source: queries/BaseQuery.js, line 608
|
setPageStartingAt(targetPage) : boolean | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets the starting page for later executions of the query. Source: queries/BaseQuery.js, line 572
|
setParameters(params) | ||||||
---|---|---|---|---|---|---|
Sets query parameters. Source: queries/BaseQuery.js, line 454
|
setSearchPattern(pattern) | ||||||
---|---|---|---|---|---|---|
Sets the search pattern for the query. Source: queries/BaseQuery.js, line 484
|
setSortBy(sortBy) Abstract | ||||||
---|---|---|---|---|---|---|
Sets the sorting options. Source: queries/BaseQuery.js, line 305
|
sortBy(sortBy, outsideCallback) Abstract | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sorts the data, specifying a callback that will be called after the sorting takes place. Source: queries/BaseQuery.js, line 317
|