cs.mergex()

Description:

Merge all parts of a cluster cursor into a local ordinary cursor.

Synatx:

cs.mergex(xi,…)

Note:

The function merges all parts of a cluster cursor by field expression xi. Parameter cs is a sequence made up of all parts of a cluster cursor ordered by field expressions [xi,…]. If cs is multicursor for a composite table and there are no parameters, perform the merge by dimension(s).

Parameters:

cs

A sequence consisting of all parts of a cluster cursor

xi

A field expression; use the comma to separate multiple expressions if it is a merge by multiple fields, like x1,x2...

Return value:

An ordinary cursor

Example:

 

A

 

1

=file@0("emp2.ctx",["127.0.0.1:8282"])

Open a cluster file

2

=A1.create()

Create a cluster composite table

3

=A2.cursor(EID,NAME;EID<8)

Return a part of the cluster cursor

4

=A2.cursor(EID,NAME;EID>495)

Return a part of the cluster cursor

5

=[A3,A4].mergex(EID)

Merge two parts of the cluster cursor in A3 and A4 by EID and return a local ordinary cursor

6

=A5.fetch()

 

 

A

 

1

[192.168.0.110:8281,192.168.18.143:8281]

 

2

=file@0("emp.ctx", A1)

Distributed composite table file

3

=A2.create()

Open a cluster composite table

4

=A3.cursor@m(;;3)

Return a cluster multicursor

5

=A4.mergex()

Perform the merge by deminsion as A4 is a multicursor for a composite table and there are no parameters