#pragma once #include #include namespace DB { class IAST; using ASTPtr = std::shared_ptr; class Context; using ContextPtr = std::shared_ptr; /// Changes a create query to a form which is appropriate or suitable for saving in a backup. void adjustCreateQueryForBackup(ASTPtr ast, const ContextPtr & global_context); /// Visits ASTCreateQuery and changes it to a form which is appropriate or suitable for saving in a backup. class DDLAdjustingForBackupVisitor { public: struct Data { ASTPtr create_query; ContextPtr global_context; }; using Visitor = InDepthNodeVisitor; static bool needChildVisit(const ASTPtr & ast, const ASTPtr & child); static void visit(ASTPtr ast, const Data & data); }; }