Here’s how to use dup() function.
Description:
Join up a cluster memory table into a local memory table.
Syntax:
T.dup()
Note:
The function joins up cluster memory table T to generate a local memory table.
Parameters:
T A cluster memory table
Return value:
A memory table
Example:
|
A |
|
1 |
=file("D:/test0.ctx","169.254.121.62:8281") |
Open a cluster file |
2 |
=A1.open() |
Return a cluster table |
3 |
=A2.attach(table) |
Retrieve cluster table table |
4 |
=A3.memory() |
Generate a cluster memory table |
5 |
=A4.dup() |
Join up the cluster memory table to return a local memory table |
Description:
Copy a local memory table onto nodes to create a duplicate cluster memory table.
Syntax:
T.dup(h)
Note:
The function copies local memory table T onto node or node sequence h to create a duplicate cluster memory table. The memory footprints will be cleaned up once T.close() is executed.
Parameters:
T h |
A local memory table A node or a node sequence |
Return value:
A duplicate cluster memory table
Example:
|
A |
|
1 |
=demo.cursor("select EID,NAME,GENDER,SALARY from EMPLOYEE where EID<10") |
|
2 |
=A1.memory() |
Generate a local memory table |
3 |
=A2.dup("169.254.121.62:8281","192.168.31.165:8281") |
Copy the local memory table into a duplicate cluster memory table |