Returns an iterator (function) that will return the next index and row each time called. Skips rows that were not set or were deleted.

Definition

Tuple Each ()

Arguments

No arguments.

Returns

  • int index The index of the row returned
  • Table row The row at the given index, same as if obtained via :Get().

Example

local myPage = Page.New("myPage", 32, {
    Page.Type.String ("Name", 64),
    Page.Type.Number "Score",
    Page.Type.Bool "IsBanned",
})

myPage:Set(0, {
    Name = "Joe",
    Score = 0,
    IsBanned = true,
})

for i, row in myPage:Each() do
    print(row.Name, row.Score, row.IsBanned)
end