RetrieveOQLFromService()
The RetrieveOQLFromService();
rule issues
an OQL query on the databases of the specified service. An optional
record can be passed in to be added to the scope of the OQL query.
The results can be assigned to a variable of the type RecordList
.
Syntax
RetrieveOQLFromService( oql string, service name [,optional record] );
Arguments
The following table lists the properties of the arguments of this stitcher rule.Argument | Description | Accepts constants | Accepts variables | Accepts eval clauses |
---|---|---|---|---|
oql string |
OQL command to execute. This can reference members
of the optional record argument, if present.Note: OQL
queries must not be terminated with a semi-colon.
|
Yes | No | Yes |
service name |
Name of the process to retrieve results from.
Available strings can be found by running the command ncp_oql
-options . |
Yes | No | No |
optional record |
If present, this is added so that it can be
dereferenced in the oql string argument. |
No | Yes | No |
Example
The following example shows the
results of a query on the model.config
table from
the service Model
being assigned to a previously
declared variable of datatype RecordList
called configData
.
configData = RetrieveOQLFromService(
"select * from model.config;",
"Model"
);
Example
The following example shows the
results of a query on the services.unManaged
table
from the service Ctrl
.
RecordList results = RetrieveOQLFromService( "select * from services.unManaged;", "Ctrl" )
for (results)
{
Record current = GetInScopeRecord();
}