Last active
November 17, 2016 14:13
-
-
Save marcelino-m/7332ec5191e34178adfabaa67e9a7841 to your computer and use it in GitHub Desktop.
Last query interpolated QSqlQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QString getLastExecutedQuery(QSqlQuery const& query) | |
{ | |
QString str = query.lastQuery(); | |
QMapIterator<QString, QVariant> it(query.boundValues()); | |
while (it.hasNext()) | |
{ | |
it.next(); | |
str.replace(it.key(),it.value().toString()); | |
} | |
return str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment