Commit 3357f53e authored by Sébastien Blin's avatar Sébastien Blin
Browse files

database: remove unused method

Change-Id: I66624be31b7cd13c90db88bc5f1059390c18b3f8
parent 5be45ab7
......@@ -344,18 +344,6 @@ Database::deleteFrom(const std::string& table, // "t
throw QueryDeleteError(query, table, where, bindsWhere);
Database::truncateTable(const std::string& table)
QSqlQuery query(db_);
auto prepareStr = std::string("TRUNCATE TABLE " + table);
if (not query.exec())
throw QueryTruncateError(query, table);
Database::QueryError::QueryError(const QSqlQuery& query)
: std::runtime_error(query.lastError().text().toStdString())
, query(query)
......@@ -217,14 +217,6 @@ public:
void deleteFrom(const std::string& table,
const std::string& where,
const std::map<std::string, std::string>& bindsWhere);
* Delete all rows from a table(truncate).
* @param table where to perfom the action on.
* @exception QueryDeleteError delete query failed.
* @note usually, identifiers between where and bindsWhere, are equals.
void truncateTable(const std::string& table);
* Select data from table.
* @param select column(s) to select.e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment