//===----------------------------------------------------------------------===// // DuckDB // // duckdb/execution/operator/helper/physical_pragma.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "duckdb/execution/physical_operator.hpp" #include "duckdb/parser/parsed_data/pragma_info.hpp" #include "duckdb/function/pragma_function.hpp" namespace duckdb { //! PhysicalPragma represents the PRAGMA operator class PhysicalPragma : public PhysicalOperator { public: static constexpr const PhysicalOperatorType TYPE = PhysicalOperatorType::PRAGMA; public: PhysicalPragma(PragmaFunction function_p, PragmaInfo info_p, idx_t estimated_cardinality) : PhysicalOperator(PhysicalOperatorType::PRAGMA, {LogicalType::BOOLEAN}, estimated_cardinality), function(std::move(function_p)), info(std::move(info_p)) { } //! The pragma function to call PragmaFunction function; //! The context of the call PragmaInfo info; public: // Source interface SourceResultType GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override; bool IsSource() const override { return true; } }; } // namespace duckdb