poco/MongoDB/src/GetMoreRequest.cpp

51 lines
908 B
C++
Raw Normal View History

2013-02-02 21:52:49 +01:00
//
// GetMoreRequest.cpp
//
// $Id$
//
// Library: MongoDB
// Package: MongoDB
// Module: GetMoreRequest
//
// Implementation of the GetMoreRequest class.
//
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
2013-02-02 21:52:49 +01:00
//
2013-03-17 19:34:36 +01:00
2013-02-02 21:52:49 +01:00
#include "Poco/MongoDB/GetMoreRequest.h"
#include "Poco/MongoDB/Element.h"
2013-03-17 19:34:36 +01:00
namespace Poco {
namespace MongoDB {
2013-02-02 21:52:49 +01:00
GetMoreRequest::GetMoreRequest(const std::string& collectionName, Int64 cursorID)
: RequestMessage(MessageHeader::GetMore),
_fullCollectionName(collectionName),
_numberToReturn(100),
2013-02-02 21:52:49 +01:00
_cursorID(cursorID)
{
}
2013-03-17 19:34:36 +01:00
2013-02-02 21:52:49 +01:00
GetMoreRequest::~GetMoreRequest()
{
}
2013-03-17 19:34:36 +01:00
2013-02-02 21:52:49 +01:00
void GetMoreRequest::buildRequest(BinaryWriter& writer)
{
writer << 0; // 0 - reserved for future use
BSONWriter(writer).writeCString(_fullCollectionName);
writer << _numberToReturn;
writer << _cursorID;
}
2013-03-17 19:34:36 +01:00
} } // namespace Poco::MongoDB