EqServerBroker class
EasyQuuery server implementation of EqBroker.
Implements
Section titled “Implements”- antiForgeryToken
- endpoint
- executeQueryUrl
- exportResultUrl
- loadModelUrl
- loadQueryListUrl
- loadQueryUrl
- newQueryUrl
- removeQueryUrl
- saveQueryUrl
- syncQueryUrl
- valueListRequestUrl
- buildAndExecute
- exportResult
- getModelPromise
- init
- loadModel
- loadQuery
- loadQueryList
- loadValueList
- newQuery
- removeQuery
- saveQuery
- syncQuery
Constructors
Section titled “Constructors”constructor
Section titled “constructor”The default constructon ⊕ new EqServerBroker(context: EqContext): EqServerBroker
Parameters:
Section titled “Parameters:”- context: EqContext - The context.
Public Properties
Section titled “Public Properties”antiForgeryToken
Section titled “antiForgeryToken”Anti-forgery token.
● antiForgeryToken: string
endpoint
Section titled “endpoint”The endpoint
● endpoint: string
= "/api/easyquery"
executeQueryUrl
Section titled “executeQueryUrl”executeQuery url resolver.
● executeQueryUrl: (modelId: any
, queryId: string
) => string
exportResultUrl
Section titled “exportResultUrl”exportResult url resolver.
● exportResultUrl: (modelId: any
, queryId: any
, format: string
) => string
loadModelUrl
Section titled “loadModelUrl”loadModel url resolver.
● loadModelUrl: (modelId: string
) => string
loadQueryListUrl
Section titled “loadQueryListUrl”loadQueryList url resolver.
● loadQueryListUrl: (modelId: string
) => string
loadQueryUrl
Section titled “loadQueryUrl”loadQuery url resolver.
● loadQueryUrl: (modelId: any
, queryId: string
) => string
newQueryUrl
Section titled “newQueryUrl”newQuery url resolver.
● newQueryUrl: (modelId: string
) => string
removeQueryUrl
Section titled “removeQueryUrl”removeQuery url resolver.
● removeQueryUrl: (modelId: any
, queryId: string
) => string
saveQueryUrl
Section titled “saveQueryUrl”saveQuery url resolver.
● saveQueryUrl: (modelId: any
, queryId: string
) => string
syncQueryUrl
Section titled “syncQueryUrl”syncQuery url resolver.
● syncQueryUrl: (modelId: any
, queryId: string
) => string
valueListRequestUrl
Section titled “valueListRequestUrl”valueListRequest url resolver.
● valueListRequestUrl: (modelId: any
, listId: string
) => string
Public Methods
Section titled “Public Methods”buildAndExecute
Section titled “buildAndExecute”Sends a execureQuery
request to the server and processes the response.
▸ buildAndExecute(params?: any
): void
Parameters:
Section titled “Parameters:”- params:
any
, Optional - A map of options to pass tobuildAndExecute
function.
Returns void
exportResult
Section titled “exportResult”Sends a exportResult
request to the server and processes the response.
▸ exportResult(options?: any
): void
Parameters:
Section titled “Parameters:”- options:
any
, Optional
Returns void
getModelPromise
Section titled “getModelPromise”Gets the loadModel promise
▸ getModelPromise(): Promise
<DataModel>
Returns Promise
<DataModel> - The promise.
Initialize broker.
▸ init(options: EqServerBrokerOptions): void
Parameters:
Section titled “Parameters:”- options: EqServerBrokerOptions - The options.
Returns void
loadModel
Section titled “loadModel”Sends a LoadModel
request to the server and processes the response.
▸ loadModel(options: any
): void
Parameters:
Section titled “Parameters:”- options:
any
- A map of options to pass toloadModel
function.
Returns void
Example:
Section titled “Example:”let broker = new EqServerBroker(context);broker.loadModel({ modelId: "MyModel", success: function(model) { alert("Model loaded!"); }});
loadQuery
Section titled “loadQuery”Sends a LoadQuery
request to the server and processes the response.
▸ loadQuery(options: any
): void
Parameters:
Section titled “Parameters:”- options:
any
- A map of options to pass to loadQuery function.
Returns void
Example:
Section titled “Example:”let broker = new EqServerBroker(context);broker.loadQuery({ id: "MyQuery", success: function(query) { alert("Query loaded!"); }});
loadQueryList
Section titled “loadQueryList”Sends a LoadQueryList
request to the server and processes the response.
▸ loadQueryList(options: any
): void
Parameters:
Section titled “Parameters:”- options:
any
- A map of options to pass toloadQueryList
function.
Returns void
Example:
Section titled “Example:”let broker = new EqServerBroker(context);broker.loadQueryListt({ modelId: "MyModel", success: function(queries) { alert("Queries loaded!"); }});
loadValueList
Section titled “loadValueList”Sends a loadValueList
request to the server and processes the response.
▸ loadValueList(options?: any
): void
Parameters:
Section titled “Parameters:”- options:
any
, Optional
Returns void
newQuery
Section titled “newQuery”Sends a newQuery
request to the server and processes the response.
▸ newQuery(options: any
): void
Parameters:
Section titled “Parameters:”- options:
any
- A map of options to pass tonewQuery
function.
Returns void
Example:
Section titled “Example:”let broker = new EqServerBroker(context);broker.newQuery({ queryId: "MyQuery", queryName: "NewQuery", success: function(query) { alert("Query created!"); }});
removeQuery
Section titled “removeQuery”Sends a removeQuery
request to the server and processes the response.
▸ removeQuery(options?: any
): void
Parameters:
Section titled “Parameters:”- options:
any
, Optional - A map of options to pass toremoveQuery
function.
Returns void
Example:
Section titled “Example:”let broker = new EqServerBroker(context);broker.removeQuery({ modelId: "MyModel", queryId: "MyQuery", success: function() { alert("Query deleted!"); }});
saveQuery
Section titled “saveQuery”Sends a saveQuery
request to the server and processes the response.
▸ saveQuery(options?: any
): void
Parameters:
Section titled “Parameters:”- options:
any
, Optional - A map of options to pass tosaveQuery
function.
Returns void
syncQuery
Section titled “syncQuery”Sends a syncQuery
request to the server and processes the response.
▸ syncQuery(params?: any
): void
Parameters:
Section titled “Parameters:”- params:
any
, Optional - A map of options to pass tosyncQuery
function.
Returns void