Sql: SqlExp: SqlSetFrom(ValueArray..)

git-svn-id: svn://ultimatepp.org/upp/trunk@7866 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-11-06 09:27:54 +00:00
parent 51412f842a
commit da042bf82c
2 changed files with 16 additions and 0 deletions

View file

@ -71,6 +71,19 @@ SqlSet::SqlSet(const SqlVal& p0) {
priority = SET;
}
SqlSet SqlSetFrom(const ValueArray& va, int pos, int count)
{
SqlSet set;
for(int i = 0; i < count; i++)
set << va[pos + i];
return set;
}
SqlSet SqlSetFrom(const ValueArray& va)
{
return SqlSetFrom(va, 0, va.GetCount());
}
static inline void sCat(SqlSet& s, SqlVal v) { s.Cat(v); }
#define E__Cat(I) sCat(*this, p##I)

View file

@ -511,6 +511,9 @@ SqlSet SqlSetFrom(const T& cont, int pos, int count)
return set;
}
SqlSet SqlSetFrom(const ValueArray& va, int pos, int count);
SqlSet SqlSetFrom(const ValueArray& va);
class SqlSetC : public SqlSet {
public:
SqlSetC(const String& s) { text = s; priority = SET; }