2015-04-11 03:10:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Parsers/IParser.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2016-08-17 05:38:51 +00:00
|
|
|
/// Parse query or set 'out_error_message'.
|
2015-04-11 04:15:14 +00:00
|
|
|
ASTPtr tryParseQuery(
|
|
|
|
IParser & parser,
|
2016-08-17 05:38:51 +00:00
|
|
|
IParser::Pos & pos, /// Moved to end of parsed fragment.
|
2015-04-11 04:15:14 +00:00
|
|
|
IParser::Pos end,
|
|
|
|
std::string & out_error_message,
|
|
|
|
bool hilite,
|
2016-08-17 05:38:51 +00:00
|
|
|
const std::string & description,
|
|
|
|
bool allow_multi_statements); /// If false, check for non-space characters after semicolon and set error message if any.
|
2015-04-11 04:15:14 +00:00
|
|
|
|
2015-04-11 03:10:23 +00:00
|
|
|
|
2016-08-17 05:38:51 +00:00
|
|
|
/// Parse query or throw an exception with error message.
|
2015-04-14 20:46:34 +00:00
|
|
|
ASTPtr parseQueryAndMovePosition(
|
|
|
|
IParser & parser,
|
2016-08-17 05:38:51 +00:00
|
|
|
IParser::Pos & pos, /// Moved to end of parsed fragment.
|
2015-04-14 20:46:34 +00:00
|
|
|
IParser::Pos end,
|
2016-08-17 05:38:51 +00:00
|
|
|
const std::string & description,
|
|
|
|
bool allow_multi_statements);
|
2015-04-14 20:46:34 +00:00
|
|
|
|
|
|
|
|
2015-04-11 04:15:14 +00:00
|
|
|
ASTPtr parseQuery(
|
|
|
|
IParser & parser,
|
|
|
|
IParser::Pos begin,
|
|
|
|
IParser::Pos end,
|
|
|
|
const std::string & description);
|
2015-04-11 03:10:23 +00:00
|
|
|
|
|
|
|
}
|