EasyQuuery server implementation of EqBroker.
Implements
Index
Constructors
Public Properties
- antiForgeryToken
- endpoint
- executeQueryUrl
- exportResultUrl
- loadModelUrl
- loadQueryListUrl
- loadQueryUrl
- newQueryUrl
- removeQueryUrl
- saveQueryUrl
- syncQueryUrl
- valueListRequestUrl
Public Methods
- buildAndExecute
- exportResult
- getModelPromise
- init
- loadModel
- loadQuery
- loadQueryList
- loadValueList
- newQuery
- removeQuery
- saveQuery
- syncQuery
Constructors
constructor
The default constructon ⊕ new EqServerBroker(context: EqContext): EqServerBroker
Parameters:
- context: EqContext - The context.
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 tobuildAndExecute
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:
- options: EqServerBrokerOptions - The options.
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 toloadModel
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 toloadQueryList
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 tonewQuery
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 toremoveQuery
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 tosaveQuery
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 tosyncQuery
function.
Returns void