kreynolds/cassandra-cql — pull request #23 by rb2k (2011-12-18 14:08:00+00:00)
Title: Problems when empty strings return for integers

We already [a fix](https://github.com/kreynolds/cassandra-cql/commit/a2740cd3a7f3fbf2c650e2e9c5bb8ad66ec5d48c) concerning the handling of nil as a row value, but there seem to still be some edge cases.

My current problem:
I insert a hash with data using cassandra-cql like this

db.execute("INSERT INTO domains (domain, rank) VALUES (?, ?)", item[:domain], item[:rank]")

It seems that when rank is nil, if will be inserted as an empty string.
When this empty string comes back for the integer column, we crash. This pull requests fixes the crash, I'm still looking into how we can keep nil from being inserted as an empty string