ch.id ()

Read(1119) Label: channel, sequence of sequences,

Description:

Generate a channel consisting of values of one or more fields.

Syntax:

ch.id(xi,…;n)

Note:

The function generates a channel containing a sequence of sequences, each of which is made up of values of xi field in channel ch. Get at most n values for each xi field; return a channel containing one sequence when there is only one xi field. It is for getting the result set from the channel.

Parameter:

ch

Channel

xi

Expression; use comma to separate multiple expressions

n

Integer; can’t be omitted

Return value:

Channel

Example:

 

A

 

1

=demo.cursor("select EID,NAME,DEPT,SALARY from EMPLOYEE")

 

2

=channel()

Create a channel.

3

=channel()

Create a channel.

4

=A2.id(#1,DEPT;10)

 

5

=A3.id(DEPT;5)

 

6

=A1.push(A2,A3)

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

7

=A1.fetch()

 

8

=A2.result()

9

=A3.result()