Skip to content

EQ.client namespace

Contains several functions which help initilize and manage EasyQuery widgets and simplify the communications with server-side code.

Initializes all EasyQuery objects and widgets.

NameTypeDescription
optionsObjectA 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.

Sends a “LoadModel” requests to the server and processes the response.

NameTypeDescription
optionsObjectA map of options to pass to loadModel function.
EQ.client.loadModel({modelId: "MyModel", success: function(modelJSON) {
alert("Model loaded!");
});

Sends a “NewQuery” request to the server and processes the response.

NameTypeDescription
optionsObjectA map of options to pass to newQuery function.
EQ.client.newQuery({modelId: "MyModel", queryName: "New Query", success: function(query) {
alert("Query created!");
});

Sends a “LoadQuery” request to the server and processes the response.

NameTypeDescription
optionsObjectA map of options to pass to loadQuery function.
EQ.client.loadQuery({queryId: "MyQuery", success: function(query) {
alert("Query loaded!");
});

Sends a “LoadQueryList” request to the server and processes the response. The request contains the name of current model

NameTypeDescription
optionsObjectThe map of options to pass to loadQuery function.
EQ.client.loadQueryList({success: function(listJSON) {
alert("Queries: " + listJSON);
});

Sends a “RemoveQuery” request to the server and processes the response.

NameTypeDescription
optionsObjectA map of options to pass to newQuery function.
EQ.client.removeQuery({modelId: "MyModel", queryId: "New Query", success: function(query) {
alert("Query created!");
});

Clears all conditions and columns in the current query.

Sends “SaveQuery” request to the server and processes the response.

NameTypeDescription
optionsObjectThe map of options to pass to SaveQuery function.

Sends “BuildQuery” request to the server and processes the response.

NameTypeDescription
paramsObjectA map of parameters to pass to buildQuery function.

Sends “SyncQuery” request to the server and processes the response.

NameTypeDescription
paramsObjectA map of parameters to pass to buildQuery function.

Sends “ExecuteQuery” request to the server and processes the response.

NameTypeDescription
paramsObjectA map of parameters to pass to buildQuery function.