blob: 9b10f9a8994e8e7a269ec55af46e785b611f863e (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* \class document::ArrayDataType
* \ingroup datatype
*
* \brief A datatype specifying what can be contained in an array field value.
*/
#pragma once
#include "collectiondatatype.h"
namespace document {
class ArrayDataType final : public CollectionDataType {
public:
explicit ArrayDataType(const DataType &nestedType);
ArrayDataType(const ArrayDataType &o) = delete;
ArrayDataType &operator=(const ArrayDataType &rhs) = delete;
~ArrayDataType() override;
ArrayDataType(const DataType &nestedType, int32_t id);
[[nodiscard]] std::unique_ptr<FieldValue> createFieldValue() const override;
void print(std::ostream&, bool verbose, const std::string& indent) const override;
[[nodiscard]] bool equals(const DataType& other) const noexcept override;
void onBuildFieldPath(FieldPath & path, vespalib::stringref remainFieldName) const override;
[[nodiscard]] bool isArray() const noexcept override { return true; }
};
} // document
|