您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BeginTransaction函数代码示例

51自学网 2021-06-01 19:54:56
  C++
这篇教程C++ BeginTransaction函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中BeginTransaction函数的典型用法代码示例。如果您正苦于以下问题:C++ BeginTransaction函数的具体用法?C++ BeginTransaction怎么用?C++ BeginTransaction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了BeginTransaction函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: BeginTransaction

void CRUUnAuditRefreshTaskExecutor::Recompute(){	// ?????	// Temporary - Should be removed when read commited from unaudited table is implemented	if (FALSE == IsTransactionOpen())	{		BeginTransaction(); 	}		CDMPreparedStatement *pStat = PrepareRecomputeMV();	// ?????	// Temporary - Should be removed when read commited from unaudited table is implemented	CommitTransaction();	BeginTransaction();	ExecuteRecomputeMV(pStat);	// ?????	// Temporary - Should be removed when read commited from unaudited table is implemented	CommitTransaction();	TESTPOINT2(CRUGlobals::TESTPOINT104, GetRootMVName());	if (TRUE == isPopindex_)	{		SetState(EX_POPINDEX);	}	else	{		SetState(EX_EPILOGUE);	}}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:33,


示例2: BeginTransaction

void CRUAuditRefreshTaskExecutor::Recompute(){	// TEMPORARY: Commented out until the privilege-skipping lock 	// is implemented 		// LockMV();	if (FALSE == IsTransactionOpen())	{		BeginTransaction(); 	}	// Decouple prepare and execute to separate transactions.	CDMPreparedStatement *pStat = PrepareRecomputeMV();	CommitTransaction();	BeginTransaction();	ExecuteRecomputeMV(pStat);	if (TRUE == isDeleteMultiTxnContext_)	{		// Delete all rows from the context log table 		auditRefreshTEDynamicContainer_.			DirectExecStatement(DELETE_MULT_TXN_CTX_TBL);	}        if (TRUE == isPopindex_)	{		CommitTransaction();		SetState(EX_POPINDEX);	}        else        {		SetState(EX_REMOTE_END);        }}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:35,


示例3: GetTargetFrame

/* static */ boolWheelTransaction::WillHandleDefaultAction(WidgetWheelEvent* aWheelEvent,                                          nsWeakFrame& aTargetWeakFrame){  nsIFrame* lastTargetFrame = GetTargetFrame();  if (!lastTargetFrame) {    BeginTransaction(aTargetWeakFrame.GetFrame(), aWheelEvent);  } else if (lastTargetFrame != aTargetWeakFrame.GetFrame()) {    EndTransaction();    BeginTransaction(aTargetWeakFrame.GetFrame(), aWheelEvent);  } else {    UpdateTransaction(aWheelEvent);  }  // When the wheel event will not be handled with any frames,  // UpdateTransaction() fires MozMouseScrollFailed event which is for  // automated testing.  In the event handler, the target frame might be  // destroyed.  Then, the caller shouldn't try to handle the default action.  if (!aTargetWeakFrame.IsAlive()) {    EndTransaction();    return false;  }  return true;}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:25,


示例4: fsal_posixdb_lockHandleForUpdate

/**  * @brief Lock the line of the Handle table with inode & devid defined in p_info *  * @param p_conn *        Database connection * @param p_info  *        Information about the file *  * @return ERR_FSAL_POSIXDB_NOERR if no error, *         another error code else. */fsal_posixdb_status_t fsal_posixdb_lockHandleForUpdate(fsal_posixdb_conn * p_conn,      /* IN */                                                       fsal_posixdb_fileinfo_t *                                                       p_info /* IN */ ){  PGresult *p_res;  char devid_str[MAX_DEVICEIDSTR_SIZE];  char inode_str[MAX_INODESTR_SIZE];  const char *paramValues[2];  CheckConn(p_conn);  BeginTransaction(p_conn, p_res);  snprintf(devid_str, MAX_DEVICEIDSTR_SIZE, "%lli", (long long int)p_info->devid);  snprintf(inode_str, MAX_INODESTR_SIZE, "%lli", (long long int)p_info->inode);  paramValues[0] = devid_str;  paramValues[1] = inode_str;  p_res = PQexecPrepared(p_conn, "lookupHandleByInodeFU", 2, paramValues, NULL, NULL, 0);  CheckResult(p_res);  PQclear(p_res);  /* Do not end the transaction, because it will be closed by the next call to a posixdb function */  ReturnCodeDB(ERR_FSAL_POSIXDB_NOERR, 0);}
开发者ID:MeghanaM,项目名称:nfs-ganesha,代码行数:36,


示例5: EndTimer

void CRUUnAuditRefreshTaskExecutor::Epilogue(){	EndTimer();	BeginTransaction();	if (TRUE == GetRefreshTask()->NeedToExecuteInternalRefresh())	{		if (CDDObject::eON_STATEMENT == GetRootMVType())		{			EpilogueHandleOnStatementMV();		}				// Set the MV(s)/indexes back available		ResetObjectsAvailable();	}	FinalMetadataUpdate();		CommitTransaction();	TESTPOINT2(CRUGlobals::TESTPOINT107, GetRootMVName());		LogClosureMessage();	SetState(EX_COMPLETE);}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:28,


示例6: RUASSERT

void CRUUnAuditRefreshTaskExecutor::PopulateIndexes(){	RUASSERT(TRUE == isPopindex_);	if (0 == numOfIndexes_)	{		return;	}	// ?????	// Temporary - Should be removed when read commited from unaudited table is implemented	BeginTransaction();#ifdef _DEBUG	CDSString msg(		"/nPopulating the secondary indexes of materialized view " 		+ GetRootMVName() + ".../n");	CRUGlobals::GetInstance()->		LogDebugMessage(CRUGlobals::DUMP_POPINDEX,"",msg);#endif	ExecuteIndexStatmenents(*pUnAuditPopIndexdynamicContainer_, IDS_RU_POPINDEX_FAILED);	// ?????	// Temporary - Should be removed when read commited from unaudited table is implemented	CommitTransaction();	TESTPOINT2(CRUGlobals::TESTPOINT105, GetRootMVName());	SetState(EX_EPILOGUE);}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:32,


示例7: TESTPOINT2

void CRUUnAuditRefreshTaskExecutor::Prologue(){	TESTPOINT2(CRUGlobals::TESTPOINT101, GetRootMVName());	BeginTransaction();	if (CDDObject::eON_STATEMENT == GetRootMVType())	{		PrologueHandleOnStatementMV();	}	// Set the MV non-available etc ...	SetObjectsUnavailable();	CommitTransaction();	TESTPOINT2(CRUGlobals::TESTPOINT102, GetRootMVName());	if (TRUE == isPurgedata_) 	{		SetState(EX_PURGE_DATA);	}	else if (TRUE == IsRecompute())	{		SetState(EX_RECOMPUTE);	}	else	{		SetState(EX_REFRESH);	}}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:28,


示例8: while

void CRULogCleanupTaskExecutor::CleanLogFirstN(SQL_STATEMENT statement){	// Compilation Stage	CDMPreparedStatement *pStat =           logCleanupTEDynamicContainer_.GetPreparedStatement(statement);	while (TRUE)	{		BeginTransaction();		ExecuteStatement(*pStat,				 IDS_RU_LOG_CLEANUP_FAILED,				 NULL, /* error argument */				 TRUE /* Obtain row count */);		CommitTransaction();		TESTPOINT(CRUGlobals::TESTPOINT160); 		if (pStat->GetRowsAffected() < 			CRULogCleanupSQLComposer::MAX_ROW_TO_DELETE_IN_SINGLE_TXN)		{			break;		}	}}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:26,


示例9: RUASSERT

void CRUTableSyncTaskExecutor::Epilogue(){	CRUTableSyncTask *pParentTask = (CRUTableSyncTask *)GetParentTask();	RUASSERT(NULL != pParentTask);	CRUTbl &tbl = pParentTask->GetTable();	if (TRUE == tbl.IsIncEpochNeeded())	{		if (TRUE == tbl.IsLongLockNeeded())		{			BeginTransaction();			tbl.ExecuteReadProtectedOpen();			CommitTransaction();		}		if (TRUE == tbl.IsLogRPOpenPending())		{			// The above condition is false only in case of 			// a non involved incremental mv.We do not need to lock the logs 			// because we rely on the ddl locks			tbl.ReleaseLogReadProtectedOpen();		}	}	SetState(EX_COMPLETE);}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:28,


示例10: RUASSERT

void CRUAuditRefreshTaskExecutor::Prologue(){	RUASSERT(FALSE == IsTransactionOpen());	            BeginTransaction();        if (CDDObject::eON_STATEMENT == GetRootMVType())	{		PrologueHandleOnStatementMV();	}				SetObjectsUnavailable();		        	              CommitTransaction();        TESTPOINT2(CRUGlobals::TESTPOINT102, GetRootMVName());	if (TRUE == isPurgedata_) 	{			// purgedata is done in main process           		SetState(EX_PURGE_DATA);	}	else 	{		// refresh, recompute, and popindex done in remote process		SetState(EX_REMOTE_START);	}	}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:26,


示例11: EndTransactionInternal

voidClientLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,                                   void* aCallbackData,                                   EndTransactionFlags aFlags){  if (!mForwarder->IPCOpen()) {    mInTransaction = false;    return;  }  if (mWidget) {    mWidget->PrepareWindowEffects();  }  EndTransactionInternal(aCallback, aCallbackData, aFlags);  ForwardTransaction(!(aFlags & END_NO_REMOTE_COMPOSITE));  if (mRepeatTransaction) {    mRepeatTransaction = false;    mIsRepeatTransaction = true;    if (BeginTransaction()) {      ClientLayerManager::EndTransaction(aCallback, aCallbackData, aFlags);    }    mIsRepeatTransaction = false;  } else {    MakeSnapshotIfRequired();  }  mInTransaction = false;  mTransactionStart = TimeStamp();}
开发者ID:yrliou,项目名称:gecko-dev,代码行数:30,


示例12: EndTransactionInternal

voidClientLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,                                   void* aCallbackData,                                   EndTransactionFlags aFlags){  if (mWidget) {    mWidget->PrepareWindowEffects();  }  EndTransactionInternal(aCallback, aCallbackData, aFlags);  ForwardTransaction(!(aFlags & END_NO_REMOTE_COMPOSITE));  if (mRepeatTransaction) {    mRepeatTransaction = false;    mIsRepeatTransaction = true;    BeginTransaction();    ClientLayerManager::EndTransaction(aCallback, aCallbackData, aFlags);    mIsRepeatTransaction = false;  } else {    MakeSnapshotIfRequired();  }  for (size_t i = 0; i < mTexturePools.Length(); i++) {    mTexturePools[i]->ReturnDeferredClients();  }  mInTransaction = false;  mTransactionStart = TimeStamp();}
开发者ID:bolt-dev,项目名称:gecko-dev,代码行数:28,


示例13: WillBeginBatchNotify

NS_IMETHODIMPnsTransactionManager::BeginBatch(){  nsresult result;  // We can batch independent transactions together by simply pushing  // a dummy transaction item on the do stack. This dummy transaction item  // will be popped off the do stack, and then pushed on the undo stack  // in EndBatch().  bool doInterrupt = false;  result = WillBeginBatchNotify(&doInterrupt);  if (NS_FAILED(result)) {    return result;  }  if (doInterrupt) {    return NS_OK;  }  result = BeginTransaction(0);    nsresult result2 = DidBeginBatchNotify(result);  if (NS_SUCCEEDED(result))    result = result2;  return result;}
开发者ID:FunkyVerb,项目名称:devtools-window,代码行数:31,


示例14: NS_ENSURE_TRUE

NS_IMETHODIMPnsTransactionManager::DoTransaction(nsITransaction *aTransaction){  nsresult result;  NS_ENSURE_TRUE(aTransaction, NS_ERROR_NULL_POINTER);  bool doInterrupt = false;  result = WillDoNotify(aTransaction, &doInterrupt);  if (NS_FAILED(result)) {    return result;  }  if (doInterrupt) {    return NS_OK;  }  result = BeginTransaction(aTransaction);  if (NS_FAILED(result)) {    DidDoNotify(aTransaction, result);    return result;  }  result = EndTransaction();  nsresult result2 = DidDoNotify(aTransaction, result);  if (NS_SUCCEEDED(result))    result = result2;  return result;}
开发者ID:FunkyVerb,项目名称:devtools-window,代码行数:35,


示例15: fsal_posixdb_delete

fsal_posixdb_status_t fsal_posixdb_delete(fsal_posixdb_conn * p_conn,   /* IN */                                          posixfsal_handle_t * p_parent_directory_handle,       /* IN */                                          fsal_name_t * p_filename,     /* IN */                                          fsal_posixdb_fileinfo_t *                                          p_object_info /* IN */ ){  result_handle_t res;  fsal_posixdb_status_t st;  char query[2048];    /*******************     * 1/ sanity check *     *******************/  if(!p_conn || !p_parent_directory_handle || !p_filename)    ReturnCodeDB(ERR_FSAL_POSIXDB_FAULT, 0);  BeginTransaction(p_conn);    /*******************************     * 2/ we check the file exists *     *******************************/  snprintf(query, 2048, "SELECT Parent.handleid, Parent.handlets, "           "Handle.deviceid, Handle.inode, Handle.nlink, Handle.ctime, Handle.ftype "           "FROM Parent INNER JOIN Handle ON Parent.handleid = Handle.handleid "           "AND Parent.handlets=Handle.handlets "           "WHERE handleidparent=%llu AND handletsparent=%u AND name='%s' "           "FOR UPDATE", p_parent_directory_handle->data.id,           p_parent_directory_handle->data.ts, p_filename->name);  st = db_exec_sql(p_conn, query, &res);  if(FSAL_POSIXDB_IS_ERROR(st))    goto rollback;  if(mysql_num_rows(res) != 1)    {      /* parent entry not found */      mysql_free_result(res);      RollbackTransaction(p_conn);      ReturnCodeDB(ERR_FSAL_POSIXDB_NOENT, 0);    }  mysql_free_result(res);    /***********************************************     * 3/ Get information about the file to delete *     ***********************************************/  st = fsal_posixdb_internal_delete(p_conn, p_parent_directory_handle->data.id,                                    p_parent_directory_handle->data.ts,                                    p_filename->name, p_object_info);  if(FSAL_POSIXDB_IS_ERROR(st))    goto rollback;  return EndTransaction(p_conn); rollback:  RollbackTransaction(p_conn);  return st;}
开发者ID:alangenfeld,项目名称:cloud-nfs,代码行数:60,


示例16: fsal_posixdb_lockHandleForUpdate

/**  * @brief Lock the line of the Handle table with inode & devid defined in p_info *  * @param p_conn *        Database connection * @param p_info  *        Information about the file *  * @return ERR_FSAL_POSIXDB_NOERR if no error, *         another error code else. */fsal_posixdb_status_t fsal_posixdb_lockHandleForUpdate(fsal_posixdb_conn * p_conn,      /* IN */                                                       fsal_posixdb_fileinfo_t *                                                       p_info /* IN */ ){  result_handle_t res;  fsal_posixdb_status_t st;  char query[2048];  BeginTransaction(p_conn);  snprintf(query, 2048, "SELECT handleid, handlets, nlink, ctime, ftype "           "FROM Handle WHERE deviceid=%llu AND inode=%llu "           "FOR UPDATE", (unsigned long long)p_info->devid, (unsigned long long)p_info->inode);  st = db_exec_sql(p_conn, query, &res);  if(FSAL_POSIXDB_IS_ERROR(st))    {      RollbackTransaction(p_conn);      return st;    }  mysql_free_result(res);  /* Do not end the transaction, because it will be closed by the next call to a posixdb function */  ReturnCodeDB(ERR_FSAL_POSIXDB_NOERR, 0);}
开发者ID:alangenfeld,项目名称:cloud-nfs,代码行数:38,


示例17: PerformEmptinessCheck

void CRUEmpCheckTaskExecutor::PerformEmptinessCheck(){	pEmpCheck_->PrepareSQL();	BeginTransaction();	pEmpCheck_->PerformCheck();			CommitTransaction(); // Although no write operations were performed...}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:9,


示例18: TRACE_LOG

bool MySqlConnection::ExecuteTransaction(MySqlTransaction* transaction){	std::list<SQLElementData> const& queries = transaction->m_queries;	if (queries.empty())	{		TRACE_LOG("MySqlConnection::ExecuteTransaction:quries is empty/n");		return true;	}	if (!BeginTransaction())	{		TRACE_LOG("MySqlConnection::ExecuteTransaction:BeginTransaction/n");        return false;	}	std::list<SQLElementData>::const_iterator itr;	for (itr = queries.begin(); itr != queries.end(); ++itr)	{		SQLElementData const& data = *itr;		switch (itr->type)		{			case SQL_ELEMENT_PREPARED:            {                PreparedStmt* stmt = data.element.stmt;                if (!Execute(stmt))                {                    WARNING_LOG("Transaction aborted. %u queries not executed./n", static_cast<uint32>(queries.size()));                    RollbackTransaction();                    return false;                }            }            break;			case SQL_ELEMENT_RAW:            {                const char* sql = data.element.query;                if (!Execute(sql))                {                    WARNING_LOG("Transaction aborted. %u queries not executed./n", static_cast<uint32>(queries.size()));                    RollbackTransaction();                    return false;                }            }            break;		}	}	// we might encounter errors during certain queries, and depending on the kind of error	// we might want to restart the transaction. So to prevent data loss, we only clean up when it's all done.	// This is done in calling functions DatabaseWorkerPool<T>::DirectCommitTransaction and TransactionTask::Execute,	// and not while iterating over every element.	CommitTransaction();	return true;}
开发者ID:einsteiner123,项目名称:paopao,代码行数:54,


示例19: BeginTransaction

void FResizeSection::OnBeginDrag(const FVector2D& LocalMousePos, TSharedPtr<FTrackNode> SequencerNode){	if( Section.IsValid() )	{		BeginTransaction( *Section, NSLOCTEXT("Sequencer", "DragSectionEdgeTransaction", "Resize section") );		DraggedKeyHandles.Empty();		Section->GetKeyHandles(DraggedKeyHandles);	}}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:11,


示例20: BeginTransaction

void FSCSEditorViewportClient::TrackingStarted( const struct FInputEventState& InInputState, bool bIsDraggingWidget, bool bNudge ){	if( !bIsManipulating && bIsDraggingWidget )	{		// Suspend component modification during each delta step to avoid recording unnecessary overhead into the transaction buffer		GEditor->DisableDeltaModification(true);		// Begin transaction		BeginTransaction( NSLOCTEXT("UnrealEd", "ModifyComponents", "Modify Component(s)") );		bIsManipulating = true;	}}
开发者ID:Codermay,项目名称:Unreal4,代码行数:12,


示例21: BeginTransaction

FReply FCanvasSlotExtension::HandleAnchorBeginDrag(const FGeometry& Geometry, const FPointerEvent& Event, EAnchorWidget::Type AnchorType){	BeginTransaction(LOCTEXT("MoveAnchor", "Move Anchor"));	bMovingAnchor = true;	MouseDownPosition = Event.GetScreenSpacePosition();	UCanvasPanelSlot* PreviewCanvasSlot = Cast<UCanvasPanelSlot>(SelectionCache[0].GetPreview()->Slot);	BeginAnchors = PreviewCanvasSlot->LayoutData.Anchors;	return FReply::Handled().CaptureMouse(AnchorWidgets[(int32)AnchorType].ToSharedRef());}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:12,


示例22: BeginTransaction

void FSingleTileEditorViewportClient::TrackingStarted(const struct FInputEventState& InInputState, bool bIsDragging, bool bNudge){	//@TODO: Should push this into FEditorViewportClient	// Begin transacting.  Give the current editor mode an opportunity to do the transacting.	const bool bTrackingHandledExternally = ModeTools->StartTracking(this, Viewport);	if (!bManipulating && bIsDragging && !bTrackingHandledExternally)	{		BeginTransaction(LOCTEXT("ModificationInViewport", "Modification in Viewport"));		bManipulating = true;		bManipulationDirtiedSomething = false;	}}
开发者ID:aovi,项目名称:UnrealEngine4,代码行数:13,


示例23: BeginTransaction

int MySQLConnection::ExecuteTransaction(SQLTransaction& transaction){    std::list<SQLElementData> const& queries = transaction->m_queries;    if (queries.empty())        return -1;    BeginTransaction();    std::list<SQLElementData>::const_iterator itr;    for (itr = queries.begin(); itr != queries.end(); ++itr)    {        SQLElementData const& data = *itr;        switch (itr->type)        {            case SQL_ELEMENT_PREPARED:            {                PreparedStatement* stmt = data.element.stmt;                ASSERT(stmt);                if (!Execute(stmt))                {                    TC_LOG_WARN("sql.sql", "Transaction aborted. %u queries not executed.", (uint32)queries.size());                    int errorCode = GetLastError();                    RollbackTransaction();                    return errorCode;                }            }            break;            case SQL_ELEMENT_RAW:            {                const char* sql = data.element.query;                ASSERT(sql);                if (!Execute(sql))                {                    TC_LOG_WARN("sql.sql", "Transaction aborted. %u queries not executed.", (uint32)queries.size());                    int errorCode = GetLastError();                    RollbackTransaction();                    return errorCode;                }            }            break;        }    }    // we might encounter errors during certain queries, and depending on the kind of error    // we might want to restart the transaction. So to prevent data loss, we only clean up when it's all done.    // This is done in calling functions DatabaseWorkerPool<T>::DirectCommitTransaction and TransactionTask::Execute,    // and not while iterating over every element.    CommitTransaction();    return 0;}
开发者ID:mynew3,项目名称:LordPsyanBots,代码行数:51,


示例24: IN

void MySqlFactoryDal::CleanupOldRecords(nlib::DateTime olderThanDate, nlib::DateTime olderThanAlertDate){	nlib::DateTime currTime = nlib::CurrentUniversalTime();	const char *pszQry[] ={		"DELETE FROM CommandParameters WHERE CommandID IN (SELECT C.CommandID from Commands C WHERE C.TimePosted < /"%s/");",	// +24*7		"DELETE FROM Commands WHERE TimePosted < /"%s/";",	// +24*7		"DELETE FROM CommandParameters WHERE CommandID IN (SELECT C.CommandID from Commands C WHERE C.TimePosted < /"%s/" AND (C.CommandStatus = 2 OR C.CommandStatus = 3));",		"DELETE FROM Commands WHERE TimePosted < /"%s/" AND (CommandStatus = 2 OR CommandStatus = 3);",		"DELETE FROM DeviceReadingsHistory WHERE ReadingTime < /"%s/";",		//there is other approach		//"DELETE FROM DeviceHistory WHERE Timestamp < /"%s/";",		"DELETE FROM DeviceHealthHistory WHERE Timestamp < /"%s/";",		"DELETE FROM NeighborHealthHistory WHERE Timestamp < /"%s/";",		"DELETE FROM AlertNotifications WHERE AlertTime < /"%s/";",		"DELETE FROM DeviceChannelsHistory WHERE Timestamp < /"%s/";",		"DELETE FROM ISACSConfirmDataBuffer WHERE Timestamp < /"%s/";",		"DELETE FROM Firmwares WHERE UploadStatus = 5 AND UploadDate < /"%s/";"	};	LOG("DEBUG CleanupOldRecords START [%s] [%s]", nlib::ToString(olderThanDate).c_str(), nlib::ToString(currTime - nlib::util::hours(24*7)).c_str());	for( int i = 0; i< sizeof(pszQry) / sizeof(pszQry[0]); ++i)	{	char szQry[ 1024 ];		snprintf( szQry, sizeof(szQry), pszQry[i], (i>=2)			? nlib::ToString(olderThanDate).c_str() 			: (nlib::ToString(currTime - nlib::util::hours(24*7)).c_str()) );		szQry[ sizeof(szQry)-1 ] = 0;		std::string obQry( szQry );		MySQLCommand command(connection, obQry);		try		{			BeginTransaction();			command.ExecuteNonQuery();			CommitTransaction();		}		catch(std::exception& ex)		{			LOG_ERROR("CATCH(exception): CleanupOldRecords failed at step=" << i << " error=" << ex.what());			RollbackTransaction();		}		catch(...)		{			LOG_ERROR("CATCH(...): CleanupOldRecords failed at step=" << i );			RollbackTransaction();		}	}	LOG_STR("DEBUG CleanupOldRecords END");}
开发者ID:dndusdndus12,项目名称:ISA100.11a-Gateway-1,代码行数:49,


示例25: BeginTransaction

FReply FGridSlotExtension::HandleShiftColumn(int32 ShiftAmount){	BeginTransaction(LOCTEXT("MoveWidget", "Move Widget"));	for ( FWidgetReference& Selection : SelectionCache )	{		ShiftColumn(Selection.GetPreview(), ShiftAmount);		ShiftColumn(Selection.GetTemplate(), ShiftAmount);	}	EndTransaction();	FBlueprintEditorUtils::MarkBlueprintAsModified(Blueprint);	return FReply::Handled();}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:16,



注:本文中的BeginTransaction函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ Bflush函数代码示例
C++ BeginReading函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。