Using the Tranactional API and Query API

The transactional API is especially effective when used in combination with the query API. In this case you should execute the queries you need to determine what items need to be created, deleted or modified before then using the transaction API pattern described above to perform the updates. We recommend that you DO NOT attempt to execute queries with a transaction - firstly because this can significantly lenghten the time that you hold the transaction open, and secondly because queries are issued on a separate database connection which may lead to them being blocked by changes in your transaction that have not yet been committed.