mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Sql: operator*=(ValueMap&, ..)
git-svn-id: svn://ultimatepp.org/upp/trunk@7883 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b8a2bae848
commit
95c1879003
3 changed files with 12 additions and 1 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue