Fix opslaan van connectie
This commit is contained in:
parent
3c943b1503
commit
fdf049a2a3
2 changed files with 23 additions and 0 deletions
|
|
@ -185,6 +185,25 @@ INSERT INTO connection_parameter (connection_uuid, pname, pvalue)
|
|||
stmt.Bind(4, b64.data(), b64.length());
|
||||
}
|
||||
stmt.Step();
|
||||
|
||||
stmt = db.Prepare(
|
||||
"DELETE FROM connection_parameter WHERE connection_uuid=?1");
|
||||
stmt.Bind(1, cc.uuid().toString());
|
||||
stmt.Step();
|
||||
|
||||
stmt = db.Prepare(
|
||||
R"__(INSERT INTO connection_parameter (connection_uuid, pname, pvalue)
|
||||
VALUES(?1, ?2, ?3))__");
|
||||
const std::unordered_map<QString, QString>& params = cc.getParameters();
|
||||
for (auto && p : params)
|
||||
{
|
||||
stmt.Reset();
|
||||
stmt.Bind(1, cc.uuid().toString());
|
||||
stmt.Bind(2, p.first);
|
||||
stmt.Bind(3, p.second);
|
||||
stmt.Step();
|
||||
}
|
||||
tx.Commit();
|
||||
}
|
||||
|
||||
} // end of unnamed namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue