.Sql/SqlStatement.cpp: bug fix in SqlSelect::AsTable to suppress extra parentheses around aliased subselect

git-svn-id: svn://ultimatepp.org/upp/trunk@4612 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2012-02-24 07:26:26 +00:00
parent a3ea6207a8
commit 3d680acfaf
3 changed files with 5 additions and 5 deletions

View file

@ -242,11 +242,11 @@ SqlVal SqlSelect::AsValue() const
return SqlVal(String("(").Cat() << text << ")", SqlVal::LOW);
}
SqlSelect SqlSelect::AsTable(const SqlId& tab) const
SqlSet SqlSelect::AsTable(const SqlId& tab) const
{
SqlSelect h;
h.text = String("(").Cat() << text << ") as \t" << tab.ToString() << '\t';
return h;
StringBuffer t;
t << "(" << text << ")" << (char)SQLC_AS << "\t" << tab.ToString() << '\t';
return SqlSet(String(t), SqlSet::HIGH);
}
SqlSelect::SqlSelect(Fields f)

View file

@ -550,7 +550,7 @@ public:
operator SqlSet() const { return SqlSet(text, SqlSet::SETOP); }
operator SqlStatement() const { return SqlStatement(text); }
SqlVal AsValue() const;
SqlSelect AsTable(const SqlId& tab) const;
SqlSet AsTable(const SqlId& tab) const;
SqlSelect(Fields f);
SqlSelect(const SqlSet& s) { text = ~s; on = false; }

Binary file not shown.