Transactions in the SQL query and "SELECT FOR UPDATE"

In the MYSQL database there is a query like SELECT FOR UPDATE is it possible to somehow implement this design based on a couchbase database transactions?
Otherwise, I need to block reading the record until another transaction on the same record is commited

No, FOR UPDATE is a cursor which Couchbase doesn’t currently support (MB-17008, MB-50978).

You’re after pessimistic locking which isn’t supported directly in SQL++. You could use SQL++ to retrieve a document key then the relevant SDK provided APIs to lock documents. See:

See also:
for a discussion about locking strategies.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.