title: Ruby Implicit DB Connection like ActiveRecord
body: <p>I'm wondering if there is a way to connect and disconnect to a DB implicitly using Ruby like <code>ActiveRecord</code>. I'm working on connecting with Cassandra and the team doesn't want to write the connection lines manually. They just want to give the table name (a.k.a. Column Family) to the class I want to build and move on from there.</p>
  
  <p>I also want to assure that I don't connect and disconnect every time when performing parallel insertions to a table (but disconnect after the whole insertions are finished) since the reconnection process is very expensive and slows down the task.</p>
  
  <p>I couldn't find any solution, and the version that my ex-coworker wrote connects and disconnects after each task like the select statement, and the parallel insert. Any suggestions? A code example of any kind of DB would be very appreciated. Thanks.</p>
  
  <p><strong>NOTE:</strong>
  To clarify, I am using a Cassandra driver. I'm not making an ActiveRecord like ORM for Cassandra, but want to expose APIs where the devs don't have to remember writing connecting and disconnecting lines.</p>