blob: 975fca5aa2c8b5141e361e7a65c05400425d4bb8 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "forcelink.h"
#include <vespa/document/datatype/documenttype.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/update/updates.h>
namespace document {
ForceLink::ForceLink(void)
{
if (time(NULL) == 0) {
DocumentType type("foo", 1);
DocumentTypeRepo repo(type);
Document document(repo, *repo.getDocumentType("foo"), DocumentId("doc:ns:bar"));
DocumentUpdate documentUpdate;
MapValueUpdate mapValueUpdate(std::make_unique<IntFieldValue>(3), std::make_unique<ClearValueUpdate>());
AddValueUpdate addValueUpdate(std::make_unique<IntFieldValue>(3));
RemoveValueUpdate removeValueUpdate(std::make_unique<IntFieldValue>(3));
AssignValueUpdate assignValueUpdate(std::make_unique<IntFieldValue>(3));
ClearValueUpdate clearValueUpdate;
ArithmeticValueUpdate arithmeticValueUpdate(ArithmeticValueUpdate::Add, 3);
}
}
}
|