aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/common/selectcontext.h
blob: 8d88969ed23589bfba0c9ca972f6e559bec00daf (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.
#pragma once

#include <vespa/document/select/context.h>

namespace search::attribute { class IAttributeVector; }

namespace proton {

class CachedSelect;

namespace select { struct Guards; }

class SelectContext : public document::select::Context
{
public:
    SelectContext(const CachedSelect &cachedSelect);
    ~SelectContext();

    void getAttributeGuards();
    void dropAttributeGuards();

    uint32_t _docId;

    const search::attribute::IAttributeVector& guarded_attribute_at_index(uint32_t index) const noexcept;
private:
    std::unique_ptr<select::Guards> _guards;
    const CachedSelect &_cachedSelect;
};

} // namespace proton