box.begin()
- 
 box.begin([opts])¶
- Начало транзакции. Отключение неявной передачи управления до окончания транзакции. Сигнал о записи в журнал упреждающей записи будет задержан до окончания транзакции. Фактически файбер, который выполняет функцию - box.begin(), начинает «активную транзакцию со множеством запросов» с блокировкой всех остальных файберов.- Параметры: - opts (table) –(optional) transaction options: - txn_isolation– the transaction isolation level
- timeout– a timeout (in seconds), after which the transaction is rolled back
 
 - Возможные ошибки: - ошибка, если такая операция не допускается, потому что уже есть активная транзакция.
- ошибка, если по какой-либо причине нельзя выделить память.
- error and abort the transaction if the timeout is exceeded.
 - Example - -- Insert test data -- box.space.bands:insert { 1, 'Roxette', 1986 } box.space.bands:insert { 2, 'Scorpions', 1965 } box.space.bands:insert { 3, 'Ace of Base', 1987 } -- Begin and commit the transaction explicitly -- box.begin() box.space.bands:insert { 4, 'The Beatles', 1960 } box.space.bands:replace { 1, 'Pink Floyd', 1965 } box.commit() -- Begin the transaction with the specified isolation level -- box.begin({ txn_isolation = 'read-committed' }) box.space.bands:insert { 5, 'The Rolling Stones', 1962 } box.space.bands:replace { 1, 'The Doors', 1965 } box.commit() 
- opts (