Open Astrinus opened 6 years ago
I think it would be better to extend connection_parameters
by adding set_{user,password,host,...}()
methods to it rather than having a ctor taking that many parameters.
User and password should go hand in hand. What's the meaning of setting a password but not a user?
I actually thought about extending connection_parameters
, but it does not feel quite right in my head...
Yes, sure let it be set_credentials(user, pass)
, why not.
Could session constructors of the form
session({std::string, backend_factory} backend, std::string user, std::string password, std::string host = "127.0.0.1", uint16_t port = <default_db_port>)
make sense, in order to switch DBMS even more portably?I am willing to implement them if you are ok with this, at least for MySQL, PostgreSQL and Oracle (and SQLite3 in which all except DB are ignored).