mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-29 22:03:40 -06:00
.Sql: Fixing Joins/SqlId/SqlCol
git-svn-id: svn://ultimatepp.org/upp/trunk@4266 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ed6bc57370
commit
044cd307c6
3 changed files with 27 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue