Atlantiraptor Docs

foreach

Type: Plugin · Category: popular

Executes ‘query’ once for each row in the ‘row’ query.

The columns in row will be stored in the scope that is used to evaluate the query therefore the query may refer to the results from the row query.

Foreach in VQL is essentially the same as an SQL JOIN operator but much simpler to use.

If the workers parameter is specified, the plugin will spawn this many workers and evaluate the query query in each worker concurrently if possible. It is safe to use a large number here (say 100) to utilize all available cores.

Argument Type Description
row LazyExpr (required) A query or slice which generates rows.
query StoredQuery Run this query for each row.
async bool If set we run all queries asynchronously (implies workers=100).
workers int64 Total number of asynchronous workers.
column string If set we only extract the column from row.

Platforms: macOS, Linux, Windows