Query Syntax

An RXP query consists of the tags and attributes described in this section.

Query

<query [name='QueryName']> { Object } </query>

Objects

<object [global='false']>
[ <objecttype> ObjectTypeCondition </objecttype> ]
[ <cond> Condition </cond> ]
[ <fetchtype as='FieldName'/> ]
[ <fetchid as='FieldName'/> ]
[ <fetchdisplay as='FieldName'/> ]
[ <fetchorigin as='FieldName'/> ]
[ <fetchsource as='FieldName'/> ]
[ <fetchsize as='FieldName'/> ]
{ <fetchconst type='FieldType' value='Constant'
as='FieldName'/> }
{ <fetchattr attr='AttrName' as='FieldName'/> }
[ <related [countas='FieldName'][optional='true']>
RelatedSpec
</related>]
</object>

ObjectTypeCondition

<typeset flag='FlagName' [negate='true']/>
| <type name='EntityName' [negate='true']/>
| <and [negate='true']> { ObjectTypeCondition }
</and>
| <or [negate='true']> { ObjectTypeCondition }
</or>

RelatedSpec

[ <reltype> RelTypeCondition </reltype> ]
[ <cond> Condition </cond> ]
[ <fetchtype as='FieldName'/> ]
{ <fetchattr attr='AttrName' as='FieldName'/> }
Object

RelTypeCondition

<relset flag='RelFlagName' [negate='true']
[incoming='true']/>
| <rel name='RelationName' [negate='true']/>
| <and [negate='true']> { RelTypeCondition } </and>
| <or [negate='true']> { RelTypeCondition } </or>

Condition

<attr name='AttrName' op='Operation'
arg='Argument' [negate='true']/>
| <hasrelated [negate='true']> RelatedSpec
</hasrelated>
| <id equals='Integer' [negate='true']/>
| <id in='Integer{,Integer}' [negate='true']/>
| <source equals='String' [negate='true']/>
| <source in='String{,String}' [negate='true']/>
| <origin equals='SID' [negate='true']/>
| <origin in='SID{,SID}' [negate='true']/>
| <and [negate='true']> { Condition } </and>
| <or [negate='true']> { Condition } </or>

EntityName

The name of a repository entity.

AttrName

The name of an entity attribute.

FieldName

The field name of the returned record set.

Operation

= | <> | > | >= | < | <= | like | in | between

FlagName

LEGACY | PROGRAMCODE | SYSTEM | KNOWLEDGE | GENERATED | EXTRACT | COMPOSITE

RelFlagName

REFER | USE | GENERATE | PRODUCE

RelationName

The name of a relationship.

Argument

The argument of the operation. Depends on both argument type and operation.

QueryName

A string.