You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
577 B

  1. #include "DeleteStatementBuilder.h"
  2. namespace db {
  3. namespace statements {
  4. namespace builder {
  5. DeleteStatementBuilder &DeleteStatementBuilder::table(const std::string &table) {
  6. m_statement.body = "DELETE FROM " + table;
  7. return *this;
  8. }
  9. DeleteStatementBuilder &DeleteStatementBuilder::where(const std::string &where) {
  10. m_statement.body += " WHERE " + where;
  11. return *this;
  12. }
  13. DeleteStatementBuilder &DeleteStatementBuilder::close() {
  14. m_statement.body += ";\n";
  15. return *this;
  16. }
  17. }
  18. }
  19. }