Finalizes the transaction by executing MULTI on the server.

@return MultiExec
543833
public function multi()
    {
        if ($this->state->check(MultiExecState::INITIALIZED | MultiExecState::CAS)) {
            $this->state->unflag(MultiExecState::CAS);
            $this->call('MULTI');
        } else {
            $this->initialize();
        }

        return $this;
    }
682147
protected function createTransaction(array $options = null, $callable = null)
    {
        $transaction = new MultiExecTransaction($this, $options);

        if (isset($callable)) {
            return $transaction->execute($callable);
        }

        return $transaction;
    }
305404
public function complete()
        {
            $chain = $this->chain;
            $this->chaining = false;
            $this->chain = null;
            return $chain;
        }
1210773
public function processMultipleRegions() {
        return new Pool($this->client, $this->requests, [
            'concurrency' => 18,
            'fulfilled'   => function ($response, $index) {
                array_push($this->acceptedResponsesJson, json_decode($response->getBody()->getContents()));
            },
            'rejected'    => function ($reason, $index)  {
                array_push($this->rejectedResponse, $reason);
            },
        ]);
    }
795376
public function execute()
    {
        parent::execute();

        HpsInputValidation::checkAmount($this->amount);

        $xml = new DOMDocument();
        $hpsTransaction = $xml->createElement('hps:Transaction');
        $hpsCheckSale = $xml->createElement('hps:CheckSale');
        $hpsBlock1 = $xml->createElement('hps:Block1');

        $hpsBlock1->appendChild($xml->createElement('hps:Amt', sprintf("%0.2f", round($this->amount, 3))));
        $hpsBlock1->appendChild($xml->createElement('hps:CheckAction', 'SALE'));
        $hpsBlock1->appendChild($xml->createElement('hps:PaymentMethodKey', $this->paymentMethodKey));

        $recurringData = $xml->createElement('hps:RecurringData');
        if ($this->schedule != null) {
            $scheduleKey = $this->schedule;
            if ($this->schedule instanceof HpsPayPlanSchedule) {
                $scheduleKey = $this->schedule->scheduleKey;
            }
            $recurringData->appendChild($xml->createElement('hps:ScheduleID', $scheduleKey));
        }
        $recurringData->appendChild($xml->createElement('hps:OneTime', ($this->oneTime ? 'Y' : 'N')));

        $hpsBlock1->appendChild($recurringData);
        $hpsCheckSale->appendChild($hpsBlock1);
        $hpsTransaction->appendChild($hpsCheckSale);

        return $this->service->_submitTransaction($hpsTransaction, 'CheckSale');
    }
1160794
protected function sqlFinish()
	{
		$this->query_sql = ob_get_clean();

		// Flatten parameters before bind
		if (!empty($this->query_params)) {
			$this->query_params = call_user_func_array('array_merge', $this->query_params);
		}
		return $this;
	}
1105823
public function deleteAll()
    {
        $delete = $this->dsql();
        $delete->owner->beginTransaction();
        $this->hook('beforeDeleteAll', array($delete));
        $delete->delete();
        $this->hook('afterDeleteAll');
        $delete->owner->commit();
        $this->reset();

        return $this;
    }
211929
public function rollback(): self
    {
        ($this->fulfill)(
            new Request(
                $this->current()->endpoint(),
                Method::delete(),
                new ProtocolVersion(1, 1)
            )
        );
        $this->transactions = $this->transactions->dropEnd(1);

        return $this;
    }
827152
public function begin() {
        if ($this->transactionLevel < 0) throw new RuntimeException('Negative transaction nesting level detected: '.$this->transactionLevel);

        if (!$this->transactionLevel)
            $this->execute('start transaction');

        $this->transactionLevel++;
        return $this;
    }
354042
protected function executeMultiCurl()
    {
        do {
            $this->multiCurl->execute();
            $this->checkStatusMessages();
        } while ($this->multiCurl->getCurrentExecutionCode() === CURLM_CALL_MULTI_PERFORM);
        return $this;
    }
95681
protected function doProcessing()
    {
        $this->prepareProcessContext();


        // initialization process pipeline

        $initSteps = $this->initProcessSteps();

        if ( ! empty($initSteps)) {

            $this->context = app(Pipeline::class)
                 ->send($this->context)
                 ->through($initSteps)
                 ->then(function (ProcessContextInterface $context) {

                    return $context;
                 });

            $this->afterInitSteps();
        }


        // main pipeline (actual processing)

        $steps = $this->processSteps();

        if ($this->databaseTransaction) DB::beginTransaction();

        try {

            $this->context = app(Pipeline::class)
                 ->send($this->context)
                 ->through($steps)
                 ->then(function(ProcessContextInterface $context) {

                    if ($this->databaseTransaction) DB::commit();

                    return $context;
                 });

        } catch (Exception $e) {

            if ($this->databaseTransaction) DB::rollBack();

            $this->onExceptionInPipeline($e);

            throw $e;
        }

        $this->afterPipeline();


        $this->populateResult();
    }
44015
public function finalize()
    {
        $lines = array();

        foreach ($this->edits as $edit) {
            if ($edit->final)
                array_splice($lines, sizeof($lines), 0, $edit->final);
        }
        return $lines;
    }
1193234
public function beginTransaction()
    {
        $this->setActive(true);
        $this->_pdo->beginTransaction();
        return $this->_transaction = new Transaction($this);
    }
244467
protected function process()
    {
        // Workaround for PHP Bug #61141.
        if (curl_multi_select($this->handle) === -1) {
            usleep(100);
        }

        do {
            $mrc = curl_multi_exec($this->handle, $active);
        } while ($mrc === CURLM_CALL_MULTI_PERFORM);

        return [$mrc, $active];
    }
508834
public function finalize()
    {
        $this->query = array_filter($this->query, function ($value) {
            return !empty($value) || is_bool($value) || is_numeric($value);
        });

        return $this;
    }
85496
public function rollback()
    {
        $res = null;

        if (empty($this->pendingTransactionBegin[$this->transLevel])
            && isset($this->transLevelRolledBack[$this->transLevel])
            && $this->transLevelRolledBack[$this->transLevel] == false
        ) {
            $this->dbRollback();
        }

        if ($this->transLevel == 0) {
            throw $this->createException('Rollback without transaction');
        }

        $this->cleanAfterCommit();
        $this->transLevel--;

        return $this;
    }
1361588
function commit() {
		$this->savepoint--;

		if ($this->savepoint == 0) {
			$this->dbh->commit();
		}
		else { // not finished with transaction yet
			$this->dbh->exec('RELEASE SAVEPOINT save'.$this->savepoint);
		}

		return $this;
	}