| List: | MySQL++ | « Previous MessageNext Message » | |
| From: | Joel Fielder | Date: | January 8 2010 10:20am |
| Subject: | mysqlpp::ScopedConnection | ||
| View as plain text | |||
Hi Warren, I've got a useful class which I use a lot when dealing with a connection pool, for example: mysqlpp::ScopedConnection connection(pool); mysqlpp::Query query(connection->query()); query << "SELECT 1"; query.execute(); It grabs the connection on construction and releases upon destruction, but it also provides operator->() so you can treat it as if it were a pointer to a Connection. Would you like a patch? If so, where would be an appropriate place in the library and are there any other gotchas? Joel
| 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 |
