cs.push()

Read(1180) Label: cursor, channel,

Description:

Push data in a cursor into a channel.

Syntax:

cs.push(chi ,…)

Note:

The function pushes data in cursor cs into channel chi, but the action needs to wait until the data in the cursor is fetched; then returns the cursor itself. The function supports multicursors.

Parameter:

cs

Cursor

chi

Channel

Return value:

Cursor

Example:

 

A

 

1

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

Create a cursor.

2

=channel()

Create a channel.

3

=A2.select(ORDERID>100)

Attach ch.select() operation to the channel.

4

=A2.fetch()

Keep data in the channel.

5

=A1.push(A2)

Be ready to push A1’s cursor data to the channel.

6

=A1.fetch()

Fetch data from A1 cursor when the cursor data is really pushed into the channel and the operations in the channel are executed.

7

=A2.result()

Fetch the final result set from the channel.

Related function:

ch.push()

channel()