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.
When activating the Select button, the name of all open repositories will be displayed in the related selection list.

Model:

Specify the name of the model to be queried. Model names are case sensitive.
When activating the Select button, the name of all open models located in the repository(ies) specified by the <Repository> argument will be displayed in the related selection list..

Query Schema:

Specify the name of the Query schema(ta) to use. Query schema names are case insensitive.
When activating the Select button, the name of all Query schemata that exists for the underlying EXPRESS schema of the model specified in the <Model> argument will be displayed in the related selection list.

Query:

Specify the name of the Query Function to be invoked.
When activating the Select button, the name of all existing Query functions in the specified Query Schema will be displayed in the related selection list.

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.
When activating the Select button, all available columns will be displayed in the related selection list. The selected item will be added to the current content in the related input field of the actual dialog.
This argument is only valid when the [result as table] option is enabled.

Order by:

Specify which column to sort by. Columns of data types SdaiInteger, SdaiInstance, SdaiString and SdaiEnumeration can be specified in this argument.
When activating the Select button, all available columns will be displayed in the related selection list.
This argument is only effective when the [result as table] option is enabled.

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.
When activating the Select button, a window is opened to allow browsing the directory structure and select/specify the desired file.

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.
This option has no effect on file name arguments.

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.
When the query result is displayed in a table window, then each column can be sorted when clicking on the column header frame.
Any number of tables can be active on the screen simultaneously. The actual available virtual memory is the only limitation factor for the number of simultaneously active tables. The EDMinstanceBrowser can be activated by clicking on a table cell that contain an instanceID or an aggregateID. The result table can be sorted according to a column by clicking on the column head frame.

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.
If the option [file output] is set, then the output from these functions will be written to the actual <Output file> if defined, else the output from these functions will be written to the EDMsupervisor output window.

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.
Only one of the [html format], [xml format] and [ascii format] can be enabled in the same command execution.

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.
Only one of the [html format], [xml format] and [ascii format] can be enabled in the same command execution.

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.
Only one of the [html format], [xml format] and [ascii format] can be enabled in the same command execution.

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