EqBroker interface
Defines the broker’s interfaces. Broker is one of the important parts of EasyQuery library which is responsible for the communication with the server-side: getting information about the model, generating SQL (or other type of queries), executing queries, etc.
- buildAndExecute
- exportResult
- getModelPromise
- init
- loadModel
- loadQuery
- loadQueryList
- loadValueList
- newQuery
- removeQuery
- saveQuery
- syncQuery
Methods
Section titled “Methods”buildAndExecute
Section titled “buildAndExecute”Executes the current query and processes the result.
▸ buildAndExecute(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains thequery
property which contains a JSON representation of the query.
Returns any
exportResult
Section titled “exportResult”Executes the current query and exports the result to the specified format.
▸ exportResult(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains thequery
property which contains a JSON representation of the query andformat
property which defines the format of the exported data (e.g.csv
).
Returns any
getModelPromise
Section titled “getModelPromise”Returns the Promise
of the model loading process
▸ getModelPromise(): Promise
<DataModel>
Returns Promise
<DataModel>
Initializes the broker
▸ init(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional -
Returns any
loadModel
Section titled “loadModel”Loads the data model
▸ loadModel(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains themodelId
property which defines the ID of the model we want to load
Returns any
loadQuery
Section titled “loadQuery”Loads the query
▸ loadQuery(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains theid
property which defines the ID of the query we want to load
Returns any
loadQueryList
Section titled “loadQueryList”Loads the list of queries available for the current user.
▸ loadQueryList(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains themodelId
property which defines the ID of the model for which we want to load the list of available queries.
Returns any
loadValueList
Section titled “loadValueList”Load the list of values for some value editor
▸ loadValueList(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains theeditoId
orlistName
propertis which define the ID of the value editor or the name of the list we want to get
Returns any
newQuery
Section titled “newQuery”Creates a new query and returns its content back to the client-side.
▸ newQuery(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains themodelId
property which defines the ID of the model for which we want to create a new query.
Returns any
removeQuery
Section titled “removeQuery”Removes the current query from some storage on the server-side.
▸ removeQuery(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains theid
property which defines the ID of the query we would like to remove.
Returns any
saveQuery
Section titled “saveQuery”Saves the current query to some storage on the server-side.
▸ saveQuery(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains thequery
property which contains a JSON representation of the query to save.
Returns any
syncQuery
Section titled “syncQuery”Syncs the content of the current query with the server-side.
▸ syncQuery(options?: any
): any
Parameters:
Section titled “Parameters:”- options:
any
, Optional - The content of theoptions
parameter depends on broker’s implementation. Usually it contains thequery
property which contains a JSON representation of the query.
Returns any