ch .conj()

Read(471) Label: split, channel, union,

Description:

Split each of the records in a channel, union the members and return the resulting union as a channel.

Syntax:

ch.conj()

Note:

The function computes a given expression over the records in channel ch to split each of them into a sequence or a records sequence, union the members and return the resulting union as a channel. This is an attached computation.

Parameters:

ch

Channel

An expression that returns a record sequence/table sequence

Return value:

Channel

Example:

 

A

 

1

=demo.cursor("select * from GYMNASTICSWOMEN")

The above is the content of GYMNASTICSWOMEN table

2

=channel()

Create a channel

3

=A2.conj(create(ID,NAME,COUNTRY,SUBJECT,SCORES).record([ID,NAME,COUNTRY,"VAULT",VAULT,ID,NAME,COUNTRY, "UNEVENBARS",UNEVENBARS,ID,NAME,COUNTRY,"BALANCEBEAM",BALANCEBEAM,ID,NAME,COUNTRY,"FLOOR",FLOOR]))

Split up the records in A2’s channel into a sequence, union the records and return the union result as a channel

3

=A2.fetch()

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

4

=A1.push(A2)

Be ready to push data in A1’s cursor into the channel, but the action needs to wait; data in A1’s cursor is pushed into the channel and operations are performed as the fetch() operation is performed over A1

5

=A1.fetch()

 

6

=A2.result()