USMeta.Relationships |
At runtime, gets metadata information about relationships from the model developed in USoft Definer. This information includes attribute settings of the relationship itself, as well as a list of parent table column - child table column pairs. These column pairs show how records in the child table refer to the corresponding parent record. Returns an XML document of the form demonstrated in Example 1 below. Syntax
All parameters are optional. Parameter values that you pass are mapped to parameters by alias name. The 'PERSON' value in the following example is for parent-table-name-pattern because of the "Parents" alias: SELECT USMeta.Relationships( 'PERSON' Parents )
(For backward compatibility only, it is possible to supply parameter values by position. Using this syntax, a list of non-aliased values maps to the parameter list in the order stated, with empty values at the end of the list if you supply less than 3 values, and '' (the empty string) as a way of explicitly declaring an empty value.) Parent-table-name-pattern is a regular expression that matches zero, one or more parent tables in the model. The result data is limited to relationships that have a parent table matching the pattern. If parent-table-name-pattern is omitted, then result data is not limited in this way. Child-table-name-pattern is a regular expression that matches zero, one or more child tables in the model. The result data is limited to relationships that have a child table matching the pattern. If child-table-name-pattern is omitted, then result data is not limited in this way. Role-name-pattern is a regular expression that matches zero, one or more role names in the model. The result data is limited to relationships that have a role name matching the pattern. If role-name-pattern is omitted, then result data is not limited in this way. Example 1 This example returns relationship information on all relationships that have the SCHEDTOUR table als their parent table:
The return value of this statement could be:
Example 2 This example returns relationship information about all relationships that have as their child table name an alphanumeric uppercase string that contains 'SCHEDTOUR':
See also |