ch.push()

Read(1091) Label: push, channel,

Description:

Push data in a channel into another channel.

Syntax:

ch.push(chi ,…)

Note:

The function pushes data in channel ch into channel chi, and returns channel ch itself.

Parameter:

ch

Channel

chi

Channel

Return value:

Channel

Example:

 

A

 

1

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

Create a channel.

2

=channel()

Create a channel.

3

=channel()

Create a channel.

4

=A2.select(ORDERID>100)

Attach ch.select() operation to A2’s channel.

5

=A1.push(A2)

Push data in A1’s cursor into A2’s channel.

6

=A2.push(A3)

A3 Push data in A2’s channel into A3’s channel.

7

=A2.fetch()

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

8

=A3.groups(SELLERID:SellerId;sum(AMOUNT):Total)

Attach ch.groups() operation to A3’s channel.

9

=A1.fetch()

 

Data in A1’s cursor is actually pushed into the channel as the operation begins.

10

=A2.result()

 

Get results from A2’s channel.

11

=A3.result()

Get results from A3’s channel.

Related function:

cs.push()

channel()