sql.h 1.6 KB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include <yql/essentials/parser/lexer_common/hints.h>
  3. #include <yql/essentials/parser/lexer_common/lexer.h>
  4. #include <yql/essentials/parser/proto_ast/common.h>
  5. #include <yql/essentials/public/issue/yql_warning.h>
  6. #include <yql/essentials/public/issue/yql_issue_manager.h>
  7. #include <yql/essentials/ast/yql_ast.h>
  8. #include <yql/essentials/sql/settings/translation_settings.h>
  9. #include <util/generic/hash.h>
  10. #include <util/generic/hash_set.h>
  11. #include <google/protobuf/message.h>
  12. namespace NSQLTranslation {
  13. NYql::TAstParseResult SqlToYql(const TString& query, const TTranslationSettings& settings,
  14. NYql::TWarningRules* warningRules = nullptr, NYql::TStmtParseInfo* stmtParseInfo = nullptr,
  15. TTranslationSettings* effectiveSettings = nullptr);
  16. google::protobuf::Message* SqlAST(const TString& query, const TString& queryName, NYql::TIssues& issues, size_t maxErrors,
  17. const TTranslationSettings& settings = {}, ui16* actualSyntaxVersion = nullptr);
  18. ILexer::TPtr SqlLexer(const TString& query, NYql::TIssues& issues, const TTranslationSettings& settings = {}, ui16* actualSyntaxVersion = nullptr);
  19. NYql::TAstParseResult SqlASTToYql(const TString& query, const google::protobuf::Message& protoAst, const TSQLHints& hints, const TTranslationSettings& settings);
  20. TVector<NYql::TAstParseResult> SqlToAstStatements(const TString& query, const TTranslationSettings& settings,
  21. NYql::TWarningRules* warningRules = nullptr, ui16* actualSyntaxVersion = nullptr, TVector<NYql::TStmtParseInfo>* stmtParseInfo = nullptr);
  22. } // namespace NSQLTranslationV0