Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

DataTable DataTable myDataTable.Each(fn: (row: DataRow) => void)

DataTable DataTable myDataTable.Each(fn: (row: DataRow, i: number) => void)

Arguments

(row: DataRow) => void fn

...

(row: DataRow, i: number) => void fn
Function to call for every data row.

...

Code Block
languagejs
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Each(function () {
    var id = this.Id;
});

Remarks

If callback is null, error is thrown.

Example

Scan all rows

Code Block
languagejs
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Each(function (row) {
    console.log(row.Id);
});

Examples

...

Code Block
languagejs
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Each(function () {
    var id = this.Id;
});

...

Code Block
languagejs
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Each(function (row) {
    console.log(row.Id);
});