Sql: SqlSelect now can add individual fetch values using operator()

git-svn-id: svn://ultimatepp.org/upp/trunk@2587 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-08-02 10:29:31 +00:00
parent 588ee11378
commit b64f6fa99b
2 changed files with 10 additions and 0 deletions

View file

@ -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;

View file

@ -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);