.Sql: Fixing Joins/SqlId/SqlCol

git-svn-id: svn://ultimatepp.org/upp/trunk@4266 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-12-07 08:49:45 +00:00
parent ed6bc57370
commit 044cd307c6
3 changed files with 27 additions and 3 deletions

View file

@ -152,6 +152,15 @@ SqlSelect& SqlSelect::From(SqlId table) {
return *this;
}
SqlSelect& SqlSelect::From(SqlCol table)
{
String t1 = ~table;
text = "select " + text + " from " + t1;
tables << ',' << t1;
on = false;
return *this;
}
SqlSelect& SqlSelect::From(SqlId table1, SqlId table2) {
String t1 = ~table1;
String t2 = ~table2;
@ -161,6 +170,15 @@ SqlSelect& SqlSelect::From(SqlId table1, SqlId table2) {
return *this;
}
SqlSelect& SqlSelect::From(SqlCol table1, SqlCol table2) {
String t1 = ~table1;
String t2 = ~table2;
text = "select " + text + " from " + t1 + ", " + t2;
tables << ',' << t1 << ',' << t2;
on = false;
return *this;
}
SqlSelect& SqlSelect::From(SqlId table1, SqlId table2, SqlId table3) {
String t1 = ~table1;
String t2 = ~table2;