Exemplo n.º 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 );
}
Exemplo n.º 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;
}
Exemplo n.º 3
0
///////////////////////////////////////////////////////////////
//
// CDatabaseManagerImpl::QueryFree
//
//
//
///////////////////////////////////////////////////////////////
bool CDatabaseManagerImpl::QueryFree ( CDbJobData* pJobData )
{
    ClearLastErrorMessage ();
    return m_JobQueue->FreeCommand ( pJobData );
}