Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

RESPEC

RESPEC

Renames each element of the given struct value based on the names of the elements in the specified complex data type definition.

Syntax

RESPEC(:Type.type_definition_library.type_definition, struct_value)
The following table describes the arguments for this command:
Argument
Required/Optional
Description
:Type.type_definition_library.type_definition
Required
The complex data type definition that represents the schema of the struct data.
Use the reference qualifier
:Type
to reference the type definition library that contains the complex data type definition.
struct_value
Required
The struct value for which you want to change the element names. You can enter any valid transformation expression that evaluates to a struct.
The data type of each element in the complex data type definition must match the data type of the corresponding element of the struct.

Return Value

Struct.

Examples

The following expression changes the names of the elements in the struct port h2_sales based on the names in the complex data type definition h1_sales_def.
RESPEC(:Type.type_definition_library.h2_sales_def, h2_sales)
h2_sales_def
h2_sales
RETURN VALUE
{ q1_sales : int q2_sales : bigint }
{ q3_total : int q4_total : bigint }
{ q1_sales : int q2_sales : bigint }

0 COMMENTS

We’d like to hear from you!