clj-rethinkdb icon indicating copy to clipboard operation
clj-rethinkdb copied to clipboard

Modify structure of Connection record

Open danielcompton opened this issue 10 years ago • 1 comments
trafficstars

I'm interested in peoples thoughts about modifying the structure of the Connection record.

From #50:

There's two things we could do to make this kind of bug not happen in the future:

  1. Move the close function inside the Connection. People should be able to call close and this will use the close method on the Connection. However in my limited testing this doesn't seem to be happening. I'm not quite sure why, I thought records defined their methods as functions in the ns they were defined in.
  2. Give the connection many fields, rather than putting them all inside a single conn variable. The only things that need to be in the atom are :waiting and :token, so they could go into atoms. The other Java objects are already mutable, and :db probably shouldn't be mutable.

danielcompton avatar Jul 01 '15 00:07 danielcompton

https://github.com/apa512/clj-rethinkdb/pull/50#issuecomment-117531605

danielcompton avatar Jul 02 '15 06:07 danielcompton