aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Functions/JSONPath/ASTs/ASTJSONPathRange.h
blob: 083d4b8e3abb7f913024075e0798f4c19667b942 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <vector>
#include <Parsers/IAST.h>

namespace DB
{
class ASTJSONPathRange : public IAST
{
public:
    String getID(char) const override { return "ASTJSONPathRange"; }

    ASTPtr clone() const override { return std::make_shared<ASTJSONPathRange>(*this); }

    /// Ranges to lookup in json array ($[0, 1, 2, 4 to 9])
    /// Range is represented as <start, end (non-inclusive)>
    /// Single index is represented as <start, start + 1>
    std::vector<std::pair<UInt32, UInt32>> ranges;
    bool is_star = false;
};

}