Interface for components that monitor updates to record collections of each record type as a whole.
Called by the DBOs from within the transactions when records of the given record types are modified. The method is called just before the transaction is committed.
Name Type Description
module:x2node-dbos~DBOExecutionContext DBO execution context.
Set.<string> Names of updated record types.
Promiseis returned, the transaction is not committed until the promise is fulfilled. If the promise is rejected, the whole transaction gets rolled back. Any other type of returned value is ignored and the transaction is committed immediately.
getCollectionsVersion(tx, recordTypeNames [, lockType])
Get record collection version information for the specified record types.
Name Type Argument Description
module:x2node-dbos~Transaction The transaction.
Set.<string> Names of the record types to include.
If provided, the collections are locked until the end of the transaction. The value can be either "shared" or "exclusive".
Returns:Promise of the result object. The result object includes two properties:
modifiedOn, which is a
Daterepresenting the last modification timestamp of the records collection among the requested ones that was modified most recently, and
version, which is a number that is a sum of all requested record collection versions.