aboutsummaryrefslogtreecommitdiff
path: root/lib/database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/database.cpp')
-rw-r--r--lib/database.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/database.cpp b/lib/database.cpp
index d4365647..a5df22af 100644
--- a/lib/database.cpp
+++ b/lib/database.cpp
@@ -202,8 +202,7 @@ void Database::addGroupSessionIndexRecord(const QString& roomId, const QString&
QPair<QString, qint64> Database::groupSessionIndexRecord(const QString& roomId, const QString& sessionId, qint64 index)
{
- QSqlQuery query(database());
- query.prepare(QStringLiteral("SELECT * FROM group_session_record_index WHERE roomId=:roomId AND sessionId=:sessionId AND i=:index;"));
+ auto query = prepareQuery(QStringLiteral("SELECT * FROM group_session_record_index WHERE roomId=:roomId AND sessionId=:sessionId AND i=:index;"));
query.bindValue(":roomId", roomId);
query.bindValue(":sessionId", sessionId);
query.bindValue(":index", index);