EQ.client namespace
Contains several functions which help initilize and manage EasyQuery widgets and simplify the communications with server-side code.
Functions
Section titled “Functions”Initializes all EasyQuery objects and widgets.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
options | Object | A map of options to pass to EasyQuery core objects and widgets. By default all parameters are taken directly from easyQuerySettings global variable |
EQ.client.init({ serviceUrl: "EQService.asmx", modelName: "nwind", columnsPanel: { allowAggrColumns: true, attrElementFormat: "{attr}", showColumnCaptions: false }, queryPanel: { listRequestHandler: onListRequest } });
You don’t need to call this function directly if eq.view.js or eq.report.js script is used since the initilization code of those scriptions calls this function automatically.
loadModel
Section titled “loadModel”Sends a “LoadModel” requests to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
options | Object | A map of options to pass to loadModel function. |
EQ.client.loadModel({modelId: "MyModel", success: function(modelJSON) { alert("Model loaded!");});
newQuery
Section titled “newQuery”Sends a “NewQuery” request to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
options | Object | A map of options to pass to newQuery function. |
EQ.client.newQuery({modelId: "MyModel", queryName: "New Query", success: function(query) { alert("Query created!");});
loadQuery
Section titled “loadQuery”Sends a “LoadQuery” request to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
options | Object | A map of options to pass to loadQuery function. |
EQ.client.loadQuery({queryId: "MyQuery", success: function(query) { alert("Query loaded!");});
loadQueryList
Section titled “loadQueryList”Sends a “LoadQueryList” request to the server and processes the response. The request contains the name of current model
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
options | Object | The map of options to pass to loadQuery function. |
EQ.client.loadQueryList({success: function(listJSON) { alert("Queries: " + listJSON);});
removeQuery
Section titled “removeQuery”Sends a “RemoveQuery” request to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
options | Object | A map of options to pass to newQuery function. |
EQ.client.removeQuery({modelId: "MyModel", queryId: "New Query", success: function(query) { alert("Query created!");});
clearQuery
Section titled “clearQuery”Clears all conditions and columns in the current query.
saveQuery
Section titled “saveQuery”Sends “SaveQuery” request to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
options | Object | The map of options to pass to SaveQuery function. |
buildQuery
Section titled “buildQuery”Sends “BuildQuery” request to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
params | Object | A map of parameters to pass to buildQuery function. |
syncQuery
Section titled “syncQuery”Sends “SyncQuery” request to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
params | Object | A map of parameters to pass to buildQuery function. |
buildAndExecute
Section titled “buildAndExecute”Sends “ExecuteQuery” request to the server and processes the response.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
params | Object | A map of parameters to pass to buildQuery function. |