LITERAL_SEGMENT_VALUE

 

Inserts a string or numeric literal representing the value of a literal key segment of a foreign key that is referenced in the "from key" side of a relationship. Literal key segments defined in repository don't have a data type, only a value, so this token determines whether to insert a string or numeric literal by looking at the matching field segment in the relations associated "to key".

 

For example, consider a relationship involving the following two structures and keys:

 

Structure A                                                  Structure B

FROM Foreign key                                        TO Access key

Segment 1, literal 0                                        Field rectype (D1)

Segment 2, field customer (D6)                    Field customer (D6)
 

In order to the type of literal value to insert  for the literal segment in structure A, the code looks at the matching field segment in structure B. The field is a D1, so a numeric literal value will be inserted.

 

Usage

<LITERAL_SEGMENT_VALUE>

IMPORTANT NOTE

This token can ONLY be used in a relation FROM key segment loop, and further ONLY when processing a LITERAL segment, which can only exist in a FOREIGN key. The <IF SEG_TYPE_LITERAL> expression should be used to ensure this is the case. For example:

 

<RELATION_LOOP>

    <FROM_KEY_SEGMENT_LOOP>

        <IF SEG_TYPE_LITERAL>

            <LITERAL_SEGMENT_VALUE>

        </IF SEG_TYPE_LITERAL>

    </FROM_KEY_SEGMENT_LOOP>

</RELATION_LOOP>

 

Possible values

A numeric literal, e.g.                    25

A string literal, e.g.                    "ABC"

Alternate forms

None

See also

<LITERAL_SEGMENT_CSTYPE>

Other relation key segment loop expansion tokens

 

 

 


Copyright © 2018  Synergex International, Inc.