Example #1
0
bool Database::CommitTransaction()
{
    if (!m_pAsyncConn || !m_currentTransaction.get())
        return false;

    // if async execution is not available
    if (!m_bAllowAsyncTransactions)
        return CommitTransactionDirect();

    // add SqlTransaction to the async queue
    m_threadBody->Delay(m_currentTransaction.release());
    return true;
}
Example #2
0
bool Database::CommitTransaction()
{
    if (!m_pAsyncConn)
        return false;

    //check if we have pending transaction
    if (!m_TransStorage->get())
        return false;

    //if async execution is not available
    if (!m_bAllowAsyncTransactions)
        return CommitTransactionDirect();

    //add SqlTransaction to the async queue
    m_threadBody->Delay(m_TransStorage->detach());
    return true;
}