progaudi.tarantool icon indicating copy to clipboard operation
progaudi.tarantool copied to clipboard

Managing Transactions

Open enescaglar opened this issue 5 years ago • 1 comments

Hi,

Is there a way to manage transactions through the library?

In tarantool, transaction is started with box.begin() and committed with box.commit() functions. But I couldn't find any methods in the library to manage the transactions.

What I would like to do is, begin a transaction, make updates/inserts to a space and then commit the transaction.

I tried adding some functions like below and calling these functions from the library, but it didn't work.

function begin_transaction(dummy) box.begin() end

function commit_transaction(dummy) box.commit() end

Thank you.

enescaglar avatar Aug 03 '20 16:08 enescaglar

@olegrok gives the answer, which is relevant for all tarantool connectors / clients. In short: the connector feature is blocked on https://github.com/tarantool/tarantool/issues/2016. One may use stored procedures as partial workaround (it resolves some cases, but does not help with other ones).

Totktonada avatar Aug 03 '20 21:08 Totktonada