blob: 0d6156bc8705f9562e79caf74aa625c40df8b8de (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "removefieldpathupdate.h"
#include <vespa/document/fieldvalue/iteratorhandler.h>
#include <ostream>
namespace document {
using namespace fieldvalue;
RemoveFieldPathUpdate::RemoveFieldPathUpdate() noexcept
: FieldPathUpdate(Remove)
{
}
RemoveFieldPathUpdate::~RemoveFieldPathUpdate() = default;
RemoveFieldPathUpdate::RemoveFieldPathUpdate(stringref fieldPath, stringref whereClause)
: FieldPathUpdate(Remove, fieldPath, whereClause)
{
}
void
RemoveFieldPathUpdate::print(std::ostream& out, bool verbose, const std::string& indent) const
{
out << "RemoveFieldPathUpdate(\n";
FieldPathUpdate::print(out, verbose, indent + " ");
out << "\n" << indent << ")";
}
void
RemoveFieldPathUpdate::deserialize(const DocumentTypeRepo& repo, const DataType& type, nbostream & stream)
{
FieldPathUpdate::deserialize(repo, type, stream);
}
namespace {
class RemoveIteratorHandler : public IteratorHandler {
public:
RemoveIteratorHandler() = default;
ModificationStatus doModify(FieldValue &) override {
return ModificationStatus::REMOVED;
}
};
}
std::unique_ptr<IteratorHandler>
RemoveFieldPathUpdate::getIteratorHandler(Document&, const DocumentTypeRepo &) const {
return std::make_unique<RemoveIteratorHandler>();
}
} // ns document
|