T.memory()

Description:

Convert a table sequence to an in-memory table.

Syntax:

T.memory()

Note:

The function converts table sequence T into an in-memory table. If T is a pure table sequence, keep it pure.

Parameter:

T

A table sequence or a pure table sequence; if the table sequence has key an index, they will be inherited.

Option:

@o

Directly use records of the original table sequence; when data of the original table sequence changes, the data in the returned in-memory table follows to change; by default, the function copies and convert data in the original table sequence; in this case, data in the in-memory table does not follow to change even if data in the original table sequence changes

Return value:

In-memory table

Example:

 

A

 

1

=demo.query("select EID,NAME,GENDER,SALARY from employee where EID <= 30")

 

2

=A1.keys(EID)

Set EID as A1’s key.

3

=A1.memory()

Convert table sequence A1 to an in-memory table, during which the key is inherited.

4

=A1.memory@o()

 

5

=A1.insert(0)

Append an empty record in the end of the original table sequence.

Check A2 and find that no empty record is displayed at the end; check A3 and find that there is an empty record at the end

6

=demo.query@v("select * from DEPT")

Return a pure table sequence.

7

=A6.memory()

Convert A6’s pure table sequence to an in-memory table and keep it pure.