mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-02 06:06:59 -06:00
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:
parent
588ee11378
commit
b64f6fa99b
2 changed files with 10 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue