batch()

Search
Feedback

Usage

batch(expression, batchSize)

Description
Enables batching for the given expression, i.e. if the expression contains a long-running function (for example the deletion of all nodes of a given type, see examples below), that function will be instructed to commit its results in batches of batchSize.

Useful in situations where large numbers of nodes are created, modified or deleted in a StructrScript expression.

Examples

${batch(delete(find('Item')), 1000)}
${batch(each(find('Item'), set(data.visibleToPublicUsers, true))), 1000)}

Graph-Browser

About this article
Last change 2017-07-09
Topics