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.

31 lines
713 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 AbstractStatementBuilder {
  11. protected:
  12. Statement &m_statement;
  13. explicit AbstractStatementBuilder(Statement &statement) : m_statement(statement) {}
  14. public:
  15. operator Statement() const {
  16. return std::move(m_statement);
  17. }
  18. };
  19. class StatementBuilder : public AbstractStatementBuilder {
  20. public:
  21. Statement m_statement;
  22. StatementBuilder() : AbstractStatementBuilder{m_statement} {
  23. }
  24. };
  25. }
  26. }
  27. }