EqServerBroker class

EasyQuuery server implementation of EqBroker.

Implements

EqBroker

Index

Constructors

Public Properties

Public Methods

Constructors


constructor

The default constructon ⊕ new EqServerBroker(context: EqContext): EqServerBroker

Parameters:


Public Properties


antiForgeryToken

Anti-forgery token.

● antiForgeryToken: string


endpoint

The endpoint

● endpoint: string = "/api/easyquery"


executeQueryUrl

executeQuery url resolver.

● executeQueryUrl: (modelId: any, queryId: string) => string


exportResultUrl

exportResult url resolver.

● exportResultUrl: (modelId: any, queryId: any, format: string) => string


loadModelUrl

loadModel url resolver.

● loadModelUrl: (modelId: string) => string


loadQueryListUrl

loadQueryList url resolver.

● loadQueryListUrl: (modelId: string) => string


loadQueryUrl

loadQuery url resolver.

● loadQueryUrl: (modelId: any, queryId: string) => string


newQueryUrl

newQuery url resolver.

● newQueryUrl: (modelId: string) => string


removeQueryUrl

removeQuery url resolver.

● removeQueryUrl: (modelId: any, queryId: string) => string


saveQueryUrl

saveQuery url resolver.

● saveQueryUrl: (modelId: any, queryId: string) => string


syncQueryUrl

syncQuery url resolver.

● syncQueryUrl: (modelId: any, queryId: string) => string


valueListRequestUrl

valueListRequest url resolver.

● valueListRequestUrl: (modelId: any, listId: string) => string


Public Methods


buildAndExecute

Sends a execureQuery request to the server and processes the response.

▸ buildAndExecute(params?: any): void

Parameters:

  • params: any, Optional - A map of options to pass to buildAndExecute function.

Returns void


exportResult

Sends a exportResult request to the server and processes the response.

▸ exportResult(options?: any): void

Parameters:

  • options: any, Optional

Returns void


getModelPromise

Gets the loadModel promise

▸ getModelPromise(): Promise<DataModel>

Returns Promise<DataModel> - The promise.


init

Initialize broker.

▸ init(options: EqServerBrokerOptions): void

Parameters:

Returns void


loadModel

Sends a LoadModel request to the server and processes the response.

▸ loadModel(options: any): void

Parameters:

  • options: any - A map of options to pass to loadModel function.

Returns void

Example:


let broker = new EqServerBroker(context);
broker.loadModel({
   modelId: "MyModel",
   success: function(model) {
      alert("Model loaded!");
   }
});


loadQuery

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

▸ loadQuery(options: any): void

Parameters:

  • options: any - A map of options to pass to loadQuery function.

Returns void

Example:


let broker = new EqServerBroker(context);
broker.loadQuery({
   id: "MyQuery",
   success: function(query) {
      alert("Query loaded!");
   }
});


loadQueryList

Sends a LoadQueryList request to the server and processes the response.

▸ loadQueryList(options: any): void

Parameters:

  • options: any - A map of options to pass to loadQueryList function.

Returns void

Example:


let broker = new EqServerBroker(context);
broker.loadQueryListt({
   modelId: "MyModel",
   success: function(queries) {
      alert("Queries loaded!");
   }
});


loadValueList

Sends a loadValueList request to the server and processes the response.

▸ loadValueList(options?: any): void

Parameters:

  • options: any, Optional

Returns void


newQuery

Sends a newQuery request to the server and processes the response.

▸ newQuery(options: any): void

Parameters:

  • options: any - A map of options to pass to newQuery function.

Returns void

Example:


let broker = new EqServerBroker(context);
broker.newQuery({
   queryId: "MyQuery",
   queryName: "NewQuery",
   success: function(query) {
      alert("Query created!");
   }
});


removeQuery

Sends a removeQuery request to the server and processes the response.

▸ removeQuery(options?: any): void

Parameters:

  • options: any, Optional - A map of options to pass to removeQuery function.

Returns void

Example:


let broker = new EqServerBroker(context);
broker.removeQuery({
   modelId: "MyModel",
   queryId: "MyQuery",
   success: function() {
      alert("Query deleted!");
   }
});


saveQuery

Sends a saveQuery request to the server and processes the response.

▸ saveQuery(options?: any): void

Parameters:

  • options: any, Optional - A map of options to pass to saveQuery function.

Returns void


syncQuery

Sends a syncQuery request to the server and processes the response.

▸ syncQuery(params?: any): void

Parameters:

  • params: any, Optional - A map of options to pass to syncQuery function.

Returns void