Ejemplo n.º 1
0
 CursorResultSet(boost::shared_ptr<Connection> const &conn, std::string cursorName, int fetch_count)
     : conn_(conn),
       cursorName_(cursorName),
       fetch_size_(fetch_count),
       is_closed_(false),
       refCount_(new int(1))
 {
     getNextResultSet();
 }
Ejemplo n.º 2
0
 CursorResultSet(std::unique_ptr<ConnectionManager::PoolType::handle> && conn_handle,
                 std::string cursorName,
                 int fetch_count)
     : conn_handle_(std::move(conn_handle)),
       cursorName_(cursorName),
       fetch_size_(fetch_count),
       is_closed_(false)
 {
     getNextResultSet();
 }
Ejemplo n.º 3
0
 virtual bool next()
 {
     if (rs_->next()) {
         return true;
     } else if (rs_->size() == 0) {
         return false;
     } else {
         getNextResultSet();
         return rs_->next();
     }
 }
Ejemplo n.º 4
0
    virtual bool next()
    {
        if (!rs_)
        {
            getNextResultSet();
        }

        if (rs_->next())
        {
            return true;
        }
        else
        {
            close();
            return false;
        }
    }