예제 #1
0
파일: stubs_c.c 프로젝트: LuoZijun/mldonkey
value ml_select(value fd_list, value timeout)
{
#if defined(HAVE_POLL) && defined(HAVE_SYS_POLL_H) && !defined(__MINGW32__)
    if (use_poll) 
      return try_poll(fd_list, timeout);
    else
      return try_select(fd_list, timeout);
#else
    return try_select(fd_list, timeout);
#endif
}
예제 #2
0
    bool execute(const std::string& sql, Args&&... args)
    {
        if (!prepare(sql))
        {
            return false;
        }

        if (!add_bind_value(std::forward<Args>(args)...))
        {
            return false;
        }
        return try_select();
    }
예제 #3
0
    typename std::enable_if<is_tuple<Tuple>::value, bool>::type execute(const std::string& sql, Tuple&& t)
    {
        if (!prepare(sql))        
        {
            return false;
        }

        if (!add_bind_value(std::forward<Tuple>(t)))
        {
            return false;
        }
        return try_select();
    }
예제 #4
0
    bool execute(const std::string& sql)
    {
        if (!prepare(sql))
        {
            return false;
        }

        if (!execute())
        {
            return false;
        }
        return try_select();
    }