示例#1
0
///////////////////////////////////////////////////////////////
//
// 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 );
}
示例#2
0
///////////////////////////////////////////////////////////////
//
// 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;
}
示例#3
0
///////////////////////////////////////////////////////////////
//
// CDatabaseManagerImpl::QueryFree
//
//
//
///////////////////////////////////////////////////////////////
bool CDatabaseManagerImpl::QueryFree ( CDbJobData* pJobData )
{
    ClearLastErrorMessage ();
    return m_JobQueue->FreeCommand ( pJobData );
}