8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 01:23:03 +01:00

Slightly clearer output.

This commit is contained in:
dimitr 2011-02-04 12:13:46 +00:00
parent e967ba7ba4
commit c398168403
3 changed files with 39 additions and 11 deletions

View File

@ -248,12 +248,21 @@ void RecursiveStream::print(thread_db* tdbb, string& plan, bool detailed, unsign
}
else
{
level++;
plan += "(";
m_root->print(tdbb, plan, false, level);
if (!level)
{
plan += "(";
}
m_root->print(tdbb, plan, false, level + 1);
plan += ", ";
m_inner->print(tdbb, plan, false, level);
plan += ")";
m_inner->print(tdbb, plan, false, level + 1);
if (!level)
{
plan += ")";
}
}
}

View File

@ -176,6 +176,7 @@ void Union::print(thread_db* tdbb, string& plan, bool detailed, unsigned level)
if (detailed)
{
plan += printIndent(++level) + "Union";
for (size_t i = 0; i < m_args.getCount(); i++)
{
m_args[i]->print(tdbb, plan, true, level);
@ -183,17 +184,25 @@ void Union::print(thread_db* tdbb, string& plan, bool detailed, unsigned level)
}
else
{
level++;
plan += "(";
if (!level)
{
plan += "(";
}
for (size_t i = 0; i < m_args.getCount(); i++)
{
if (i)
{
plan += ", ";
}
m_args[i]->print(tdbb, plan, false, level);
m_args[i]->print(tdbb, plan, false, level + 1);
}
if (!level)
{
plan += ")";
}
plan += ")";
}
}

View File

@ -362,11 +362,21 @@ namespace
}
else
{
plan += "(";
if (!level)
{
plan += "(";
}
m_outer->print(tdbb, plan, false, level + 1);
plan += ", ";
m_inner->print(tdbb, plan, false, level + 1);
plan += ")";
if (!level)
{
plan += ")";
}
}
}