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 returned from a composite table, perform the merge by dimension(s) and fields before it(them) automatically.
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("emp2.ctx":[1],["127.0.0.1:8282"]) |
Open a cluster file |
2 |
=A1.open() |
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("emp.ctx":[2,3], A1) |
|
3 |
=A2.open() |
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 returned from a composite table and there are no parameters |