aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/base/forcelink.cpp
blob: 970d270af5755e5d8e68f593cfb0e6e7ccb5b30d (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 Vespa.ai. 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);
    }
}

}