Functions - lang.table

add

Add record to the table.

close

Releases the database connection. If the table data is fully iterated, it will be automatically closed. This explicit close is required only if it is not fully iterated.

getNext

Retrives the current row and return a record with the data in the columns.

hasNext

Checks for a new row in the given table. If a new row is found, moves the cursor to it.

iterator

Returns an iterator over the members of tbl. The iterator will iterate over the rows of the table in order.

remove

Remove data from the table.

add

(table tbl, $anonType$8 data)

returns error | ()

Add record to the table.

Parameters

  • tbl table
  • table to operate on

  • Return Type

    (error | ())
  • An error will be returned if there is any error occurred during adding data or else nil is returned

close

Releases the database connection. If the table data is fully iterated, it will be automatically closed. This explicit close is required only if it is not fully iterated.

Parameters

  • tbl table
  • table to operate on

getNext

(table tbl)

returns $anonType$6

Retrives the current row and return a record with the data in the columns.

Parameters

  • tbl table
  • table to operate on

  • Return Type

    ($anonType$6)
  • The resulting row as a record

hasNext

(table tbl)

returns boolean

Checks for a new row in the given table. If a new row is found, moves the cursor to it.

Parameters

  • tbl table
  • table to operate on

  • Return Type

    (boolean)
  • True if there is a new row; false otherwise

iterator

(table tbl)

returns $anonType$2

Returns an iterator over the members of tbl. The iterator will iterate over the rows of the table in order.

Parameters

  • tbl table
  • table to operate on

remove

(table tbl, function(any) returns (boolean) func)

returns int | error

Remove data from the table.

Parameters

  • tbl table
  • table to operate on

  • func function(any) returns (boolean)
  • The function pointer for delete crieteria

  • Return Type

    (int | error)
  • An int the number of deleted record count or error if any error occurred during removing data