aboutsummaryrefslogtreecommitdiffstats
path: root/persistence/src/vespa/persistence/spi/result.cpp
blob: 4aa01d226492505cb7befb15a1250298b510506b (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
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "result.h"
#include <vespa/document/fieldvalue/document.h>
#include <vespa/vespalib/stllike/asciistream.h>

namespace storage::spi {

Result::Result(const Result &) = default;
Result & Result::operator = (const Result &) = default;
Result::~Result() { }

vespalib::string
Result::toString() const {
    vespalib::asciistream os;
    os << "Result(" << _errorCode << ", " << _errorMessage << ")";
    return os.str();
}

std::ostream &
operator << (std::ostream & os, const Result & r) {
    return os << r.toString();
}

GetResult::GetResult(Document::UP doc, Timestamp timestamp)
    : Result(),
      _timestamp(timestamp),
      _doc(std::move(doc))
{ }

GetResult::~GetResult() { }
BucketIdListResult::~BucketIdListResult() { }

IterateResult::~IterateResult() { }

}