mperham / connection_pool

Generic connection pooling for Ruby
MIT License
1.63k stars 143 forks source link

Add query method to avoid method_missing for most SQL DB connections #44

Closed rubencaro closed 10 years ago

rubencaro commented 10 years ago

I've come adding this for performance, as almost every use I make of this pool is for MySQL connections, and almost every call I made on them is to query.

Maybe you could merge it as it does not really bother much the rest of the code. Maybe not. Your choice!

Thanks anyway.

djanowski commented 10 years ago

If you have a specialized pool and don't want to hit method_missing and don't want to use ConnectionPool#with you should implement your own object. For instance: https://github.com/djanowski/redic-pool/blob/master/lib/redic/pool.rb

rubencaro commented 10 years ago

You are absolutely right. Thanks!