Is it possible to set two column values with one being `allow_commit_timestamp`?
Yes, this is possible, and in most cases also the preferable way to do it. Splitting it into two statements and executing these using a batchUpdate
call is not recommended.
The only exception would be if you intend to read from the commit timestamp column during the same transaction. Setting the LastUpdated
column to PENDING_COMMIT_TIMESTAMP()
will make the column unreadable for the remainder of the transaction, so in that case it could make sense to set the LastUpdated
value at a later moment. Note however that it does not make sense to do so using a single batchUpdate
, as you would have no chance of actually trying to read from the table between the two update statements.