Source code for relstorage.adapters.oracle.txncontrol
################################################################################ Copyright (c) 2009 Zope Foundation and Contributors.# All Rights Reserved.## This software is subject to the provisions of the Zope Public License,# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS# FOR A PARTICULAR PURPOSE.###############################################################################"""TransactionControl implementations"""from__future__importabsolute_importimportloggingfrom..txncontrolimportGenericTransactionControlfrom..txncontrolimportnoop_when_history_freelog=logging.getLogger(__name__)
[docs]defcommit_phase1(self,store_connection,tid):"""Begin a commit. Returns the transaction name. The transaction name must not be None. This method should guarantee that commit_phase2() will succeed, meaning that if commit_phase2() would raise any error, the error should be raised in commit_phase1() instead. """ifself.twophase:store_connection.connection.prepare()return'-'