sql.h 1.4 KB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include <yql/essentials/ast/yql_ast.h>
  3. #include <yql/essentials/parser/lexer_common/hints.h>
  4. #include <yql/essentials/parser/proto_ast/common.h>
  5. #include <yql/essentials/parser/proto_ast/gen/v1_proto_split/SQLv1Parser.pb.main.h>
  6. #include <yql/essentials/public/issue/yql_warning.h>
  7. #include <yql/essentials/public/issue/yql_issue_manager.h>
  8. #include <yql/essentials/sql/settings/translation_settings.h>
  9. #include <google/protobuf/message.h>
  10. namespace NSQLTranslation {
  11. struct TTranslationSettings;
  12. }
  13. namespace NSQLTranslationV1 {
  14. NYql::TAstParseResult SqlToYql(const TString& query, const NSQLTranslation::TTranslationSettings& settings, NYql::TWarningRules* warningRules = nullptr);
  15. NYql::TAstParseResult SqlASTToYql(const TString& query, const google::protobuf::Message& protoAst, const NSQLTranslation::TSQLHints& hints, const NSQLTranslation::TTranslationSettings& settings);
  16. TVector<NYql::TAstParseResult> SqlToAstStatements(const TString& query, const NSQLTranslation::TTranslationSettings& settings, NYql::TWarningRules* warningRules, TVector<NYql::TStmtParseInfo>* stmtParseInfo = nullptr);
  17. bool NeedUseForAllStatements(const NSQLv1Generated::TRule_sql_stmt_core::AltCase& subquery);
  18. bool SplitQueryToStatements(const TString& query, TVector<TString>& statements, NYql::TIssues& issues,
  19. const NSQLTranslation::TTranslationSettings& settings);
  20. } // namespace NSQLTranslationV1