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.
|
|
|
|
//
|
2014-05-04 21:02:42 +02:00
|
|
|
// 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),
|
2013-02-15 22:32:24 +01:00
|
|
|
_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
|