Sql: operator*=(ValueMap&, ..)

git-svn-id: svn://ultimatepp.org/upp/trunk@7883 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-11-11 12:23:40 +00:00
parent b8a2bae848
commit 95c1879003
3 changed files with 12 additions and 1 deletions

View file

@ -381,7 +381,7 @@ public:
Logc() { data = 0xffffffff; }
};
struct LogPos {
struct LogPos : Moveable<LogPos> {
Logc x, y;
bool operator==(LogPos b) const { return x == b.x && y == b.y; }

View file

@ -704,4 +704,13 @@ SqlR::SqlR(const SqlStatement& s)
#endif
void operator*=(ValueMap& map, SqlSelect select)
{
map.Clear();
Sql sql;
sql * select;
while(sql.Fetch())
map.Add(sql[0], sql[1]);
}
END_UPP_NAMESPACE

View file

@ -524,6 +524,8 @@ void SqlLoadColumn(T& t, SqlSelect select)
t.Add(sql[0], sql[1]);
}
void operator*=(ValueMap& map, SqlSelect select);
template<class K, class V>
void operator*=(VectorMap<K, V>& map, SqlSelect select)
{