:return: True if there is an open transaction.
178794
def in_transaction(self):
        
        self._in_transaction = self._in_transaction and self.is_connected
        return self._in_transaction
1129089
public static boolean startTransaction(Connection conn) throws SQLException {
        if (conn == null) {
            return false;
        }
        String dsName = openConnDsName.get().get(conn);
        OpenConnStats connStats = dsName != null ? openConnStats.get().get(dsName) : null;
        if (connStats != null && !connStats.inTransaction) {
            conn.setAutoCommit(false);
            connStats.inTransaction = true;
            return true;
        }
        return false;
    }
539124
def begin_transaction(self, transaction_type, trace_parent=None):
        
        return self.tracer.begin_transaction(transaction_type, trace_parent=trace_parent)
687009
def is_complete(self):
        """"""

        if 'status' in self.transfer_info:
            self._complete = self.transfer_info['status'] == 'STATUS_COMPLETE'

        return self._complete
1326670
def begin(self):
        
        if self._transaction_id is not None:
            raise ValueError("Transaction already begun")

        if self.committed is not None:
            raise ValueError("Transaction already committed")

        if self._rolled_back:
            raise ValueError("Transaction is already rolled back")

        database = self._session._database
        api = database.spanner_api
        metadata = _metadata_with_prefix(database.name)
        txn_options = TransactionOptions(read_write=TransactionOptions.ReadWrite())
        response = api.begin_transaction(
            self._session.name, txn_options, metadata=metadata
        )
        self._transaction_id = response.id
        return self._transaction_id
580935
def isBusy(self):
        
        # return self._impl.isBusy()
        if self._lock.acquire(False):
            self._lock.release()
            return False
        else:
            return True
145789
def is_deposit_confirmed(
        channel_state: NettingChannelState,
        block_number: BlockNumber,
) -> bool:
    
    if not channel_state.deposit_transaction_queue:
        return False

    return is_transaction_confirmed(
        channel_state.deposit_transaction_queue[0].block_number,
        block_number,
    )
161826
async def open(self) -> '_BaseAgent':
        

        LOGGER.debug('_BaseAgent.open >>>')

        # Do not open pool independently: let relying party decide when to go on-line and off-line
        await self.wallet.open()

        LOGGER.debug('_BaseAgent.open <<<')
        return self
416615
def is_locked(self):
        
        now = datetime.datetime.utcnow()
        if self.locked_until and self.locked_until >= now:
            return True
        elif self.locked_until and self.locked_until < now:
            self.unlock_account()
            return False
        else:
            return False
1239388
public function isEntryFixed()
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $sId = $this->_getSaveObjectId();
        $iLang = (int) $this->getEditLang();
        $iShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        $sParam = $this->processParam($this->getActCatId());

        $sQ = "select oxfixed from oxseo where
                   oxseo.oxobjectid = " . $oDb->quote($sId) . " and
                   oxseo.oxshopid = '{$iShopId}' and oxseo.oxlang = {$iLang} and oxparams = " . $oDb->quote($sParam);

        // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
        return (bool) \OxidEsales\Eshop\Core\DatabaseProvider::getMaster()->getOne($sQ);
    }
860753
private function isInTransaction()
    {
        $poolName = $this->poolName;
        if(null === $poolName)
        {
            $poolName = Db::getDefaultPoolName();
        }
        if(PoolManager::hasRequestContextResource($poolName))
        {
            $resource = PoolManager::getRequestContextResource($poolName);
            $db = $resource->getInstance();
            return $db->inTransaction();
        }
        else
        {
            return false;
        }
    }
642058
def is_ready(instance, pending=False):
    

    last_reload = lookup(instance, 'lastOperatingSystemReload', 'id')
    active_transaction = lookup(instance, 'activeTransaction', 'id')

    reloading = all((
        active_transaction,
        last_reload,
        last_reload == active_transaction,
    ))
    outstanding = False
    if pending:
        outstanding = active_transaction
    if instance.get('provisionDate') and not reloading and not outstanding:
        return True
    return False
736760
def result(self, timeout=None):
        
        if self.done:
            return self._result

        result = self.conn.process_packets(transaction_id=self.transaction_id,
                                           timeout=timeout)

        self._result = result
        self.done = True

        return result
251596
public static boolean isUncommitted(Transaction tx)
   {
      if (tx == null)
         return false;
      
      try
      {
         int status = tx.getStatus();

         return status == Status.STATUS_ACTIVE || status == Status.STATUS_MARKED_ROLLBACK;
      }
      catch (SystemException error)
      {
         throw new RuntimeException("Error during isUncommitted()", error);
      }
   }
93811
public static TransactionException transactionOpen(TransactionOLTP tx) {
        return create(ErrorMessage.TRANSACTION_ALREADY_OPEN.getMessage(tx.keyspace()));
    }
308985
public function inTransaction(): bool
    {
        $status = pg_transaction_status($this->getResource());

        return PGSQL_TRANSACTION_INTRANS === $status || PGSQL_TRANSACTION_INERROR === $status;
    }
1301773
public static boolean isActive(Transaction tx)
   {
      if (tx == null)
         return false;
      
      try
      {
         int status = tx.getStatus();

         return status == Status.STATUS_ACTIVE;
      }
      catch (SystemException error)
      {
         throw new RuntimeException("Error during isActive()", error);
      }
   }