Execute Query
Invokes the specified Query function with the given set of arguments. When pushing the OK-button on the Data>ExequteQuery dialog, a new dialog tailored to the actual Query function will appear. The number of input fields and the prompts will be according to the signature of the Query function to execute.
The Query function may allocate virtual memory for the result data. This allocated virtual memory is identified by the "Query result index" written out by this command. The actual virtual memory can later be released by the command Data>Query>ReleaseQueryResults to avoid "out of virtual memory" errors.
Important: The model must be opened for read and write access if the query function is supposed to update the model. See open model for details.
The expressions logging facility and the interactive EDMexpressVM can be used to test and debug a query function.
The maximum number of query input parameters in the EDMsupervisor is 20
Arguments:
Repository: | Specify the name of the repository holding the model to be queried. Repository names are case sensitive. |
Model: | Specify the name of the model to be queried. Model names are case sensitive. |
Query Schema: | Specify the name of the Query schema(ta) to use. Query schema names are case insensitive. |
Query: | Specify the name of the Query Function to be invoked. |
Columns: | Specify which columns to include in the query result table. A column name is an attribute name in an entity instance or in a view entity instance. |
Order by: | Specify which column to sort by. Columns of data types SdaiInteger, SdaiInstance, SdaiString and SdaiEnumeration can be specified in this argument. |
Output file: | Specify the name of a file that will be used to receive the result of executing the Query function in the actual Query schema. The specified file can be an existing file or the name of a file that will be created by the actual Query schema execution. This argument is valid when the [file output] option is set. |
Options:
accumulating command output | A global option that appends the command output to the EDMsupervisor output window. Otherwise the output window is refreshed and only the last command output is displayed. |
match selected input | A global option that specifies that only items that partly or exactly matches the string in the related argument input field when activating a Select button, will be in the selection list. An empty (blank) string will match all items. |
result as id | The result from the invoked Query function will be displayed as a single value. This is the default way of handling the Query result value. |
result as id contents | In case the result from the invoked Query function is an aggregate, then each element in the resulting aggregate will be displayed when this option is enabled. |
result as table | In case the result from the invoked Query function is an aggregate with entity instances or view entity instances, then the result will be displayed as a table where each instance is a row and the attributes are the columns. |
ignore empty columns | Empty columns will not be displayed or written to the actual result file. |
ascending | Ascending sorting order. This option is only valid when the <Order by> argument is set. |
descending | Descending sorting order. Ascending sorting order. This option is only valid when the <Order by> argument is set. |
file output | Specifies that the result from the Query functions will be written to the file specified in the <Output file> argument. |
html format | The output file will be created in HTML format. Default file extension is “.html”. This option is only valid when the [file output] option is set. |
xml format | The output file will be created in XML format. Default file extension is ".xml". This option is only valid when the [file output] option is set. |
ascii format | The output file will be created in ASCII format. Default file extension is ".txt". The tabulator character will be delimiter between each column when the actual query result is in table format. This option is only valid when the [file output] option is set. |
show file | The generated output file will be displayed in the available internet browser when the option [file output] is set together with one of the options [html format] or [xml format]. |
activate debugger | The EDMdebugger will be invoked when the actual Query function is executed in EDMexpressVM |