/////////////////////////////////////////////////////////////// // // CDatabaseManagerImpl::SetLogLevel // // // /////////////////////////////////////////////////////////////// void CDatabaseManagerImpl::SetLogLevel ( EJobLogLevelType logLevel, const SString& strLogFilename ) { CDbOptionsMap argMap; argMap.Set ( "name", strLogFilename ); argMap.Set ( "level", logLevel ); CDbJobData* pJobData = m_JobQueue->AddCommand ( EJobCommand::SETLOGLEVEL, NULL, argMap.ToString () ); m_JobQueue->FreeCommand ( pJobData ); }
/////////////////////////////////////////////////////////////// // // CDatabaseManagerImpl::Exec // // Start a query and ignore the result // /////////////////////////////////////////////////////////////// CDbJobData* CDatabaseManagerImpl::Exec ( SConnectionHandle hConnection, const SString& strQuery, CLuaArguments* pArgs ) { ClearLastErrorMessage (); // Check connection if ( !MapContains ( m_ConnectionTypeMap, hConnection ) ) { SetLastErrorMessage ( "Invalid connection" ); return NULL; } // Insert arguments with correct escapement SString strEscapedQuery = InsertQueryArguments ( hConnection, strQuery, pArgs ); // Start query CDbJobData* pJobData = m_JobQueue->AddCommand ( EJobCommand::QUERY, hConnection, strEscapedQuery ); // Ignore result m_JobQueue->FreeCommand ( pJobData ); return pJobData; }
/////////////////////////////////////////////////////////////// // // CDatabaseManagerImpl::QueryFree // // // /////////////////////////////////////////////////////////////// bool CDatabaseManagerImpl::QueryFree ( CDbJobData* pJobData ) { ClearLastErrorMessage (); return m_JobQueue->FreeCommand ( pJobData ); }