aboutsummaryrefslogtreecommitdiffstats
path: root/examples/steps.aup
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-28 04:31:26 +0100
committereunhhu <[email protected]>2026-09-28 04:31:26 +0100
commit63dad65b5807265dac70dd593ff123ec06595224 (patch)
treef6f998fff6586d6e70cdce7cbf3bb67a088f4b11 /examples/steps.aup
parentaab970e4444ad171f37783d1fbeed7774f748538 (diff)
downloadaup-63dad65b5807265dac70dd593ff123ec06595224.tar.gz
aup-63dad65b5807265dac70dd593ff123ec06595224.zip
Walk lists with for, and take a message's rows
for item in list [where condition] { ... } runs its block in a handler once for every item the list has, in order, the item an index of the list (read, changed, removed: a removed item does not skip the next). It compiles to Pure's EACH; a fold inside reads the walk's item as a fold in a column reads its row. A for adds nothing to the list it walks, holds no other for and does not reply, so it ends. A message field may be a list of a record (lines: list of Line): its rows arrive as a JSON array of objects and fill a list of their own, named order.lines in the module, which the handler walks, folds and counts (order.lines.count) and which is emptied when the event ends. So a transaction over many rows (an order taking stock line by line, all or nothing) and a bulk insert are one event. An output sends no rows. Nine diagnostics and an accepted app (rows in a group, where, a fold over the rows reading the walk's item, a walk that removes) are checked.
Diffstat (limited to 'examples/steps.aup')
0 files changed, 0 insertions, 0 deletions