> From: Daniel Vallejos
>
> I would like a cppdb::session constructor and open method like this:
>
> session::session(cppdb::connection_info const &ci)
> {
> open(ci);
> }
>
> void session::open(cppdb::connection_info const &ci)
> {
> conn_ = connections_manager::instance().open(ci);
> }
>
> This prevent from parsing connection string every time we need a
> session.
Good point.
Actually I was thinking the when you call
connections_manager::instance().open(std::string const &)
I would not parse the connection string as I can search the string by key in the
pool,
so actually open(std::string const &) would not cause additional parsing.
Looking to the code I had found that I do parse the string before I check
the connection pool, and it should be optimized.
In any case, what you suggested is very good point and I'll add this.
Artyom
|