aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/DbSqlite2/queryexecutorsqlite2delete.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:51:12 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:51:12 -0400
commitfeda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (patch)
tree1e50f5f666f419143f510d5ded00fe2006b7bd85 /Plugins/DbSqlite2/queryexecutorsqlite2delete.h
parentd9aa870e5d509cc7309ab82dd102a937ab58613a (diff)
New upstream version 3.2.1+dfsg1upstream/3.2.1+dfsg1
Diffstat (limited to 'Plugins/DbSqlite2/queryexecutorsqlite2delete.h')
-rw-r--r--Plugins/DbSqlite2/queryexecutorsqlite2delete.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Plugins/DbSqlite2/queryexecutorsqlite2delete.h b/Plugins/DbSqlite2/queryexecutorsqlite2delete.h
new file mode 100644
index 0000000..5d3f478
--- /dev/null
+++ b/Plugins/DbSqlite2/queryexecutorsqlite2delete.h
@@ -0,0 +1,24 @@
+#ifndef QUERYEXECUTORSQLITE2DELETE_H
+#define QUERYEXECUTORSQLITE2DELETE_H
+
+#include "db/queryexecutorsteps/queryexecutorstep.h"
+
+/**
+ * @brief The QueryExecutorSqlite2Delete class
+ *
+ * From SQLite2 documentation:
+ *
+ * Because of this optimization, the change count for "DELETE FROM table" will be zero
+ * regardless of the number of elements that were originally in the table.
+ * To get an accurate count of the number of rows deleted, use "DELETE FROM table WHERE 1" instead.
+ *
+ * This extra step will add "WHERE 1" if there is no WHERE for DELETE query.
+ *
+ */
+class QueryExecutorSqlite2Delete : public QueryExecutorStep
+{
+ public:
+ bool exec();
+};
+
+#endif // QUERYEXECUTORSQLITE2DELETE_H