ch .run()

Read(462) Label: channel, record, expression,

Description:

Compute an expression against each of the records in a channel and return the channel with new field values.

Syntax:

ch.run (xi:Fi,…)

Note:

The function computes expression xi against each of the records in channel ch, assigns the results to Fi field and returns the original channel with new field values.  This is an attached computation.

Parameters:

ch

Channel

xi

New values of Fi field

Fi

Field name in the given channel

Return value:

Channel

Example:

 

A

 

1

=demo.query("select * from EMPLOYEE")

 

2

=channel()

Create a channel

3

=A2.run(SALARY+1000:SALARY)

Attach a ch.run() operation to A2’s channel to evaluate the expression SALARY+1000, and return the original channel with the new field values

4

=A2.fetch()

Attach ch.fetch() function that get the final result set to A2’s channel to fetch and store the existing data in the channel

5

=A1.push(A2)

Push data in A1’s sequence into A2’s channel

6

=A2.result()