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.

32 lines
749 B

  1. #pragma once
  2. #include "Statement.h"
  3. #include <string>
  4. #include <vector>
  5. namespace db {
  6. namespace statements {
  7. namespace builder {
  8. class SelectStatementBuilder;
  9. class InsertStatementBuilder;
  10. class UpdateStatementBuilder;
  11. class AbstractStatementBuilder {
  12. protected:
  13. Statement &m_statement;
  14. explicit AbstractStatementBuilder(Statement &statement) : m_statement(statement) {}
  15. public:
  16. operator Statement() const {
  17. return std::move(m_statement);
  18. }
  19. };
  20. class StatementBuilder : public AbstractStatementBuilder {
  21. public:
  22. Statement m_statement;
  23. StatementBuilder() : AbstractStatementBuilder{m_statement} {
  24. }
  25. };
  26. }
  27. }
  28. }