mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
Minor priority-related fixes in SqlExp
git-svn-id: svn://ultimatepp.org/upp/trunk@1896 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
532a0ed1f0
commit
d775296b1e
3 changed files with 4 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ SqlSet operator&(const SqlSet& s1, const SqlSet& s2) {
|
||||||
SqlSet operator-(const SqlSet& s1, const SqlSet& s2) {
|
SqlSet operator-(const SqlSet& s1, const SqlSet& s2) {
|
||||||
if(s1.IsEmpty() || s2.IsEmpty())
|
if(s1.IsEmpty() || s2.IsEmpty())
|
||||||
return s1;
|
return s1;
|
||||||
return SqlSet(s1(SqlSet::SET) + SqlCase(MSSQL|PGSQL, " except ")(" minus ") + s2(SqlSet::SET), SqlSet::SETOP);
|
return SqlSet(s1(SqlSet::SET) + SqlCase(MSSQL|PGSQL|SQLITE3, " except ")(" minus ") + s2(SqlSet::SET), SqlSet::SETOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
String SqlSet::operator~() const {
|
String SqlSet::operator~() const {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ SqlSelect& SqlSelect::operator&=(const SqlSelect& s2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SqlSelect& SqlSelect::operator-=(const SqlSelect& s2) {
|
SqlSelect& SqlSelect::operator-=(const SqlSelect& s2) {
|
||||||
text << SqlCase(MSSQL|PGSQL," except ")(" minus ") << SqlCase(SQLITE3, "")("(")
|
text << SqlCase(MSSQL|PGSQL|SQLITE3," except ")(" minus ") << SqlCase(SQLITE3, "")("(")
|
||||||
<< s2.text << SqlCase(SQLITE3, "")(")");
|
<< s2.text << SqlCase(SQLITE3, "")(")");
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,7 @@ public:
|
||||||
enum PRIORITY {
|
enum PRIORITY {
|
||||||
SETOP = 50,
|
SETOP = 50,
|
||||||
SET = 100,
|
SET = 100,
|
||||||
|
HIGH = 200,
|
||||||
};
|
};
|
||||||
|
|
||||||
String operator~() const;
|
String operator~() const;
|
||||||
|
|
@ -498,7 +499,7 @@ public:
|
||||||
SqlSelect& Limit(int64 offset, int limit);
|
SqlSelect& Limit(int64 offset, int limit);
|
||||||
SqlSelect& Offset(int64 offset);
|
SqlSelect& Offset(int64 offset);
|
||||||
|
|
||||||
operator SqlSet() const { return SqlSet(text, SqlSet::SET); }
|
operator SqlSet() const { return SqlSet(text, SqlSet::SETOP); }
|
||||||
operator SqlStatement() const { return SqlStatement(text); }
|
operator SqlStatement() const { return SqlStatement(text); }
|
||||||
SqlVal AsValue() const;
|
SqlVal AsValue() const;
|
||||||
SqlSelect AsTable(SqlId tab) const;
|
SqlSelect AsTable(SqlId tab) const;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue