diff --git a/uppsrc/Sql/SqlStatement.cpp b/uppsrc/Sql/SqlStatement.cpp index 51ca6e42c..a74b8ca99 100644 --- a/uppsrc/Sql/SqlStatement.cpp +++ b/uppsrc/Sql/SqlStatement.cpp @@ -105,6 +105,14 @@ SqlSelect& SqlSelect::Offset(int64 offset) { return *this; } +SqlSelect& SqlSelect::operator()(const SqlVal& val) +{ + if(text.GetCount()) + text << ", "; + text << ~val; + return *this; +} + SqlSelect& SqlSelect::Hint(const char *hint) { text = "/*+ " + String(hint) + " */ " + text; diff --git a/uppsrc/Sql/Sqlexp.h b/uppsrc/Sql/Sqlexp.h index 98b6a082c..09475dbfa 100644 --- a/uppsrc/Sql/Sqlexp.h +++ b/uppsrc/Sql/Sqlexp.h @@ -462,6 +462,8 @@ class SqlSelect { SqlSelect& FullJoin0(const String& table); public: + SqlSelect& operator()(const SqlVal& val); + operator bool() const { return text.GetCount(); } SqlSelect& Hint(const char *hint);