#pragma once #include #include #include namespace DB { template class VisitorJSONPathRoot : public IVisitor { public: explicit VisitorJSONPathRoot(ASTPtr) { } const char * getName() const override { return "VisitorJSONPathRoot"; } VisitorStatus apply(typename JSONParser::Element & /*element*/) const override { /// No-op on document, since we are already passed document's root return VisitorStatus::Ok; } VisitorStatus visit(typename JSONParser::Element & element) override { apply(element); this->setExhausted(true); return VisitorStatus::Ok; } void reinitialize() override { this->setExhausted(false); } void updateState() override { } }; }