1//
2// GetMoreRequest.cpp
3//
4// Library: MongoDB
5// Package: MongoDB
6// Module: GetMoreRequest
7//
8// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
9// and Contributors.
10//
11// SPDX-License-Identifier: BSL-1.0
12//
13
14
15#include "Poco/MongoDB/GetMoreRequest.h"
16#include "Poco/MongoDB/Element.h"
17
18
19namespace Poco {
20namespace MongoDB {
21
22
23GetMoreRequest::GetMoreRequest(const std::string& collectionName, Int64 cursorID):
24 RequestMessage(MessageHeader::OP_GET_MORE),
25 _fullCollectionName(collectionName),
26 _numberToReturn(100),
27 _cursorID(cursorID)
28{
29}
30
31
32GetMoreRequest::~GetMoreRequest()
33{
34}
35
36
37void GetMoreRequest::buildRequest(BinaryWriter& writer)
38{
39 writer << 0; // 0 - reserved for future use
40 BSONWriter(writer).writeCString(_fullCollectionName);
41 writer << _numberToReturn;
42 writer << _cursorID;
43}
44
45
46} } // namespace Poco::MongoDB
47