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.
 
 
 

45 lines
1.2 KiB

  1. #pragma once
  2. namespace cpphibernate {
  3. namespace mariadb {
  4. template<typename T_schema>
  5. driver_t::driver_t(T_schema&& p_schema)
  6. : _impl (*this, std::forward<T_schema>(p_schema))
  7. , _connection (nullptr)
  8. { }
  9. template<typename T_schema>
  10. driver_t::driver_t(T_schema&& p_schema, ::cppmariadb::connection& p_connection)
  11. : _impl (*this, std::forward<T_schema>(p_schema))
  12. , _connection (&p_connection)
  13. { }
  14. std::ostream& driver_t::print(std::ostream& os) const
  15. { return _impl.schema->print(os); }
  16. ::cppmariadb::connection* driver_t::connection() const
  17. { return _connection; }
  18. void driver_t::connection(::cppmariadb::connection * p_connection)
  19. { _connection = p_connection; }
  20. template<typename... T_args>
  21. void driver_t::set_filter_inclusive(T_args&&... args)
  22. { _filter.set_inclusive(_impl.schema, std::forward<T_args>(args)...); }
  23. template<typename... T_args>
  24. void driver_t::set_filter_exclusive(T_args&&... args)
  25. { _filter.set_exclusive(_impl.schema, std::forward<T_args>(args)...); }
  26. void driver_t::clear_filter()
  27. { _filter.clear(); }
  28. auto& driver_t::impl() const
  29. { return _impl; }
  30. } }