iconara / cql-rb

Cassandra CQL 3 binary protocol driver for Ruby
106 stars 31 forks source link

Improve the documentation and handling of prepared statements #104

Closed iconara closed 10 years ago

iconara commented 10 years ago

93, #102, #103 all point to the need to

  1. clarify further how to use prepared statements correctly, the readme only shows how to prepare statements, not how to properly use them.
  2. do some more work to avoid creating new prepared statement objects when #prepare is called excessively.

Since prepared statement objects will stick around until a connection closes, maybe checking all connections for a statement with the same CQL as the argument to Client#prepare would work. The statement objects are stateless, so sharing them isn't a problem.