mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
batch processing
This commit is contained in:
parent
9d96110e9b
commit
e782a9d587
|
@ -147,10 +147,12 @@ int HistoryKeeper::addChatEntry(const QString& chat, const QString& message, con
|
|||
int chat_id = getChatID(chat, ctSingle).first;
|
||||
int sender_id = getAliasID(sender);
|
||||
|
||||
db->exec("BEGIN TRANSACTION");
|
||||
db->exec(QString("INSERT INTO history (timestamp, chat_id, sender, message)") +
|
||||
QString("VALUES (%1, %2, %3, '%4');")
|
||||
.arg(dt.toMSecsSinceEpoch()).arg(chat_id).arg(sender_id).arg(wrapMessage(message)));
|
||||
db->exec(QString("INSERT INTO sent_status (status) VALUES (%1)").arg(isSent));
|
||||
db->exec("COMMIT TRANSACTION");
|
||||
|
||||
messageID++;
|
||||
return messageID;
|
||||
|
|
Loading…
Reference in New Issue
Block a user