| List: | MySQL++ | « Previous MessageNext Message » | |
| From: | Jonathan Wakely | Date: | January 11 2010 12:51pm |
| Subject: | Re: mysqlpp::ScopedConnection | ||
| View as plain text | |||
2010/1/11 Joel Fielder: > Jonathan Wakely wrote: >>> >>> If you want to donate the class under the LGPL, it sounds like something >>> we'd like to have in MySQL++. >>> >> >> I'd be happy to review any patch. >> > > Ok, see patch inline below. Hope you find it useful. > > It's non-copyable so you can't use it in a container or in a copyable > object. Excellent. A few comments: There's no need to make the default constructor private. Declaring any other user-defined constructor disables the implicit generation of a default constructor. Making it private means attempting to use it will give a "constructor is private" error rather than a "no such constructor" error. Personally I think the latter is preferable so I would remove the declaration of the private default constructor. The ScopedConnection(ConnectionPool&) constructor should probably be marked 'explicit' because there is no need to support implicit conversion from a ConnectionPool to a ScopedConnection. In the constructor definition in the .cpp file it's unnecessary (but harmless) to qualify mysqlpp::ConnectionPool Regards, Jonathan
| Thread | ||
|---|---|---|
| • Query::execute crashes without a connected driver | Joel Fielder | 7 Jan |
| • Re: Query::execute crashes without a connected driver | Warren Young | 7 Jan |
| • Re: Query::execute crashes without a connected driver | Joel Fielder | 8 Jan |
| • mysqlpp::ScopedConnection | Joel Fielder | 8 Jan |
| • Re: mysqlpp::ScopedConnection | Warren Young | 9 Jan |
| • Re: mysqlpp::ScopedConnection | Jonathan Wakely | 9 Jan |
| • Re: mysqlpp::ScopedConnection | Joel Fielder | 11 Jan |
| • Re: mysqlpp::ScopedConnection | Jonathan Wakely | 11 Jan |
| • Re: mysqlpp::ScopedConnection | Warren Young | 11 Jan |
| • Re: mysqlpp::ScopedConnection | Jonathan Wakely | 11 Jan |
| • Re: Query::execute crashes without a connected driver | Joel Fielder | 13 Jan |
| • Re: Query::execute crashes without a connected driver | Warren Young | 13 Jan |
| • Re: mysqlpp::ScopedConnection | Joel Fielder | 11 Jan |
| • Re: mysqlpp::ScopedConnection | Warren Young | 11 Jan |
| • Re: mysqlpp::ScopedConnection | Joel Fielder | 11 Jan |
| • Re: mysqlpp::ScopedConnection | Warren Young | 11 Jan |
| • Re: mysqlpp::ScopedConnection | Joel Fielder | 12 Jan |
