mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-07 14:22:39 -06:00
Sql: SqlExp support for 'union all' (as operator+)
git-svn-id: svn://ultimatepp.org/upp/trunk@7701 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
deac71fc8e
commit
eb87f9b6ef
4 changed files with 49 additions and 30 deletions
|
|
@ -8,6 +8,13 @@ SqlSet operator|(const SqlSet& s1, const SqlSet& s2) {
|
|||
return SqlSet(s1(SqlSet::SET, ~SQLITE3) + " union " + s2(SqlSet::SET, ~SQLITE3), SqlSet::SETOP);
|
||||
}
|
||||
|
||||
SqlSet operator+(const SqlSet& s1, const SqlSet& s2)
|
||||
{
|
||||
if(s1.IsEmpty()) return s2;
|
||||
if(s2.IsEmpty()) return s1;
|
||||
return SqlSet(s1(SqlSet::SET, ~SQLITE3) + " union all " + s2(SqlSet::SET, ~SQLITE3), SqlSet::SETOP);
|
||||
}
|
||||
|
||||
SqlSet operator&(const SqlSet& s1, const SqlSet& s2) {
|
||||
if(s1.IsEmpty()) return s2;
|
||||
if(s2.IsEmpty()) return s1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue