2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/ASTFunction.h>
|
|
|
|
#include <Parsers/ASTIdentifier.h>
|
|
|
|
#include <Parsers/ASTExpressionList.h>
|
|
|
|
#include <Parsers/ASTCreateQuery.h>
|
|
|
|
#include <Parsers/ExpressionListParsers.h>
|
|
|
|
#include <Parsers/ParserCreateQuery.h>
|
|
|
|
#include <Parsers/ParserSelectQuery.h>
|
2011-08-18 18:48:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserNestedTable::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2013-07-11 17:35:56 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
ParserToken open(TokenType::OpeningRoundBracket);
|
|
|
|
ParserToken close(TokenType::ClosingRoundBracket);
|
2017-04-01 07:20:54 +00:00
|
|
|
ParserIdentifier name_p;
|
|
|
|
ParserNameTypePairList columns_p;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
ASTPtr name;
|
|
|
|
ASTPtr columns;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
Pos begin = pos;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-02 17:37:49 +00:00
|
|
|
/// For now `name == 'Nested'`, probably alternative nested data structures will appear
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, name, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!open.ignore(pos))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!columns_p.parse(pos, columns, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!close.ignore(pos))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
auto func = std::make_shared<ASTFunction>(StringRange(begin, pos));
|
|
|
|
func->name = typeid_cast<ASTIdentifier &>(*name).name;
|
|
|
|
func->arguments = columns;
|
|
|
|
func->children.push_back(columns);
|
|
|
|
node = func;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
return true;
|
2013-07-11 17:35:56 +00:00
|
|
|
}
|
2014-06-26 00:58:14 +00:00
|
|
|
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserIdentifierWithParameters::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2013-07-11 17:35:56 +00:00
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
ParserFunction function_or_array;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (function_or_array.parse(pos, node, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return true;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
ParserNestedTable nested;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (nested.parse(pos, node, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return true;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2013-07-11 17:35:56 +00:00
|
|
|
}
|
2011-08-18 18:48:00 +00:00
|
|
|
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserIdentifierWithOptionalParameters::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2011-08-18 18:48:00 +00:00
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
ParserIdentifier non_parametric;
|
|
|
|
ParserIdentifierWithParameters parametric;
|
2014-06-26 00:58:14 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
Pos begin = pos;
|
2011-08-18 18:48:00 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (parametric.parse(pos, node, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return true;
|
2011-08-18 18:48:00 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
ASTPtr ident;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (non_parametric.parse(pos, ident, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2017-07-12 04:10:11 +00:00
|
|
|
auto func = std::make_shared<ASTFunction>(StringRange(begin));
|
2017-04-01 07:20:54 +00:00
|
|
|
func->name = typeid_cast<ASTIdentifier &>(*ident).name;
|
|
|
|
node = func;
|
|
|
|
return true;
|
|
|
|
}
|
2011-08-18 18:48:00 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2011-08-18 18:48:00 +00:00
|
|
|
}
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserTypeInCastExpression::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2015-12-24 17:14:10 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (ParserIdentifierWithOptionalParameters::parseImpl(pos, node, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
|
|
|
const auto & id_with_params = typeid_cast<const ASTFunction &>(*node);
|
|
|
|
node = std::make_shared<ASTIdentifier>(id_with_params.range, String{ id_with_params.range.first, id_with_params.range.second });
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2015-12-24 17:14:10 +00:00
|
|
|
}
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserNameTypePairList::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2013-07-11 17:35:56 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
return ParserList(std::make_unique<ParserNameTypePair>(), std::make_unique<ParserToken>(TokenType::Comma), false)
|
|
|
|
.parse(pos, node, expected);
|
2013-07-11 17:35:56 +00:00
|
|
|
}
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserColumnDeclarationList::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2014-09-24 14:44:57 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
return ParserList(std::make_unique<ParserColumnDeclaration>(), std::make_unique<ParserToken>(TokenType::Comma), false)
|
|
|
|
.parse(pos, node, expected);
|
2014-09-24 14:44:57 +00:00
|
|
|
}
|
|
|
|
|
2013-07-11 17:35:56 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserEngine::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2011-11-01 15:16:04 +00:00
|
|
|
{
|
2017-06-18 03:07:03 +00:00
|
|
|
ParserKeyword s_engine("ENGINE");
|
2017-07-10 03:28:12 +00:00
|
|
|
ParserToken s_eq(TokenType::Equals);
|
2017-04-01 07:20:54 +00:00
|
|
|
ParserIdentifierWithOptionalParameters storage_p;
|
2011-11-01 15:16:04 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_engine.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_eq.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2011-11-01 15:16:04 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!storage_p.parse(pos, node, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
}
|
2011-11-01 15:16:04 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
return true;
|
2011-11-01 15:16:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
bool ParserCreateQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
2011-08-18 18:48:00 +00:00
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
Pos begin = pos;
|
|
|
|
|
2017-06-18 03:07:03 +00:00
|
|
|
ParserKeyword s_create("CREATE");
|
|
|
|
ParserKeyword s_temporary("TEMPORARY");
|
|
|
|
ParserKeyword s_attach("ATTACH");
|
|
|
|
ParserKeyword s_table("TABLE");
|
|
|
|
ParserKeyword s_database("DATABASE");
|
|
|
|
ParserKeyword s_if_not_exists("IF NOT EXISTS");
|
|
|
|
ParserKeyword s_as("AS");
|
|
|
|
ParserKeyword s_select("SELECT");
|
|
|
|
ParserKeyword s_view("VIEW");
|
|
|
|
ParserKeyword s_materialized("MATERIALIZED");
|
|
|
|
ParserKeyword s_populate("POPULATE");
|
2017-07-10 03:28:12 +00:00
|
|
|
ParserToken s_dot(TokenType::Dot);
|
|
|
|
ParserToken s_lparen(TokenType::OpeningRoundBracket);
|
|
|
|
ParserToken s_rparen(TokenType::ClosingRoundBracket);
|
2017-04-01 07:20:54 +00:00
|
|
|
ParserEngine engine_p;
|
|
|
|
ParserIdentifier name_p;
|
|
|
|
ParserColumnDeclarationList columns_p;
|
|
|
|
|
|
|
|
ASTPtr database;
|
|
|
|
ASTPtr table;
|
|
|
|
ASTPtr columns;
|
|
|
|
ASTPtr storage;
|
|
|
|
ASTPtr inner_storage;
|
|
|
|
ASTPtr as_database;
|
|
|
|
ASTPtr as_table;
|
|
|
|
ASTPtr select;
|
2017-04-21 12:39:28 +00:00
|
|
|
String cluster_str;
|
2017-04-01 07:20:54 +00:00
|
|
|
bool attach = false;
|
|
|
|
bool if_not_exists = false;
|
|
|
|
bool is_view = false;
|
|
|
|
bool is_materialized_view = false;
|
|
|
|
bool is_populate = false;
|
|
|
|
bool is_temporary = false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_create.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_attach.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
attach = true;
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_temporary.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
|
|
|
is_temporary = true;
|
|
|
|
}
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_database.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_if_not_exists.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
if_not_exists = true;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, database, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (ParserKeyword{"ON"}.ignore(pos, expected))
|
2017-04-25 15:21:03 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!ASTQueryWithOnCluster::parse(pos, cluster_str, expected))
|
2017-04-25 15:21:03 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
engine_p.parse(pos, storage, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
}
|
2017-07-10 03:28:12 +00:00
|
|
|
else if (s_table.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_if_not_exists.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
if_not_exists = true;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, table, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_dot.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
|
|
|
database = table;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, table, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (ParserKeyword{"ON"}.ignore(pos, expected))
|
2017-04-13 13:42:29 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!ASTQueryWithOnCluster::parse(pos, cluster_str, expected))
|
2017-04-13 13:42:29 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// List of columns.
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_lparen.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!columns_p.parse(pos, columns, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_rparen.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!engine_p.parse(pos, storage, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-04-02 17:37:49 +00:00
|
|
|
/// For engine VIEW, you also need to read AS SELECT
|
2017-04-01 07:20:54 +00:00
|
|
|
if (storage && (typeid_cast<ASTFunction &>(*storage).name == "View"
|
|
|
|
|| typeid_cast<ASTFunction &>(*storage).name == "MaterializedView"))
|
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_as.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
Pos before_select = pos;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_select.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
pos = before_select;
|
|
|
|
ParserSelectQuery select_p;
|
2017-07-10 03:28:12 +00:00
|
|
|
select_p.parse(pos, select, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
engine_p.parse(pos, storage, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_as.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
|
|
|
/// AS SELECT ...
|
|
|
|
Pos before_select = pos;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_select.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
|
|
|
pos = before_select;
|
|
|
|
ParserSelectQuery select_p;
|
2017-07-10 03:28:12 +00:00
|
|
|
select_p.parse(pos, select, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/// AS [db.]table
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, as_table, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_dot.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
|
|
|
as_database = as_table;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, as_table, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-04-02 17:37:49 +00:00
|
|
|
/// Optional - ENGINE can be specified.
|
2017-07-10 03:28:12 +00:00
|
|
|
engine_p.parse(pos, storage, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/// VIEW or MATERIALIZED VIEW
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_materialized.ignore(pos, expected))
|
2017-06-29 22:00:51 +00:00
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
is_materialized_view = true;
|
2017-06-29 22:00:51 +00:00
|
|
|
}
|
2017-04-01 07:20:54 +00:00
|
|
|
else
|
|
|
|
is_view = true;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_view.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_if_not_exists.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
if_not_exists = true;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, table, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
2017-06-29 22:00:51 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_dot.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
|
|
|
database = table;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!name_p.parse(pos, table, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-04-02 17:37:49 +00:00
|
|
|
/// Optional - a list of columns can be specified. It must fully comply with SELECT.
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_lparen.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
{
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!columns_p.parse(pos, columns, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_rparen.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-04-02 17:37:49 +00:00
|
|
|
/// Optional - internal ENGINE for MATERIALIZED VIEW can be specified
|
2017-07-10 03:28:12 +00:00
|
|
|
engine_p.parse(pos, inner_storage, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
|
2017-07-10 03:28:12 +00:00
|
|
|
if (s_populate.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
is_populate = true;
|
|
|
|
|
|
|
|
/// AS SELECT ...
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_as.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
Pos before_select = pos;
|
2017-07-10 03:28:12 +00:00
|
|
|
if (!s_select.ignore(pos, expected))
|
2017-04-01 07:20:54 +00:00
|
|
|
return false;
|
|
|
|
pos = before_select;
|
|
|
|
ParserSelectQuery select_p;
|
2017-07-10 03:28:12 +00:00
|
|
|
select_p.parse(pos, select, expected);
|
2017-04-01 07:20:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto query = std::make_shared<ASTCreateQuery>(StringRange(begin, pos));
|
|
|
|
node = query;
|
|
|
|
|
|
|
|
query->attach = attach;
|
|
|
|
query->if_not_exists = if_not_exists;
|
|
|
|
query->is_view = is_view;
|
|
|
|
query->is_materialized_view = is_materialized_view;
|
|
|
|
query->is_populate = is_populate;
|
|
|
|
query->is_temporary = is_temporary;
|
|
|
|
|
|
|
|
if (database)
|
|
|
|
query->database = typeid_cast<ASTIdentifier &>(*database).name;
|
|
|
|
if (table)
|
|
|
|
query->table = typeid_cast<ASTIdentifier &>(*table).name;
|
2017-04-21 12:39:28 +00:00
|
|
|
query->cluster = cluster_str;
|
2017-04-01 07:20:54 +00:00
|
|
|
if (inner_storage)
|
|
|
|
query->inner_storage = inner_storage;
|
|
|
|
|
|
|
|
query->columns = columns;
|
|
|
|
query->storage = storage;
|
|
|
|
if (as_database)
|
|
|
|
query->as_database = typeid_cast<ASTIdentifier &>(*as_database).name;
|
|
|
|
if (as_table)
|
|
|
|
query->as_table = typeid_cast<ASTIdentifier &>(*as_table).name;
|
|
|
|
query->select = select;
|
|
|
|
|
|
|
|
if (columns)
|
|
|
|
query->children.push_back(columns);
|
|
|
|
if (storage)
|
|
|
|
query->children.push_back(storage);
|
|
|
|
if (select)
|
|
|
|
query->children.push_back(select);
|
|
|
|
if (inner_storage)
|
|
|
|
query->children.push_back(inner_storage);
|
|
|
|
|
|
|
|
return true;
|
2011-08-18 18:48:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|