Description:
Create a channel and push data in a specified cursor into it.
Syntax:
channel(cs)
Note:
The function creates a channel, pushes data in cursor cs into it, and returns a channel. This is equivalent to cs.push(channel()).
Parameter:
cs |
A cursor. |
Return value:
Channel
Example:
|
A |
|
1 |
=demo.cursor("select * from SCORES where CLASS = 'Class one'") |
|
2 |
=channel(A1) |
Create a channel and be ready to push data in A1’s cursor into the new channel, which is equivalent to =A1.push(channel()), and return a channel. |
3 |
>A2.select(STUDENTID==1) |
Attach a computation to A2’s channel. |
4 |
>A2.fetch() |
Keep data in A2’s channel. |
5 |
=A1.fetch() |
Push data into A2’s channel when data is fetched from the cursor. |
6 |
=A2.result() |
Get data from A2’s channel.
|