Closed walkowicz closed 12 years ago
What is the schema for this column family?
CREATE COLUMNFAMILY userdata ( username text PRIMARY KEY, level_access int, active int ) WITH comment='User Data' AND comparator=text AND read_repair_chance=0.100000 AND gc_grace_seconds=864000 AND default_validation=text AND min_compaction_threshold=4 AND max_compaction_threshold=32 AND replicate_on_write=True AND compaction_strategy_class='SizeTieredCompactionStrategy' AND compression_parameters:sstable_compression='org.apache.cassandra.io.compress.SnappyCompressor';
CQL's int type corresponds Int32Type, which is different from IntegerType and not yet supported by phpcassa. Adding support for that should resolve the issue.
What CQL datatype should I use that would be compatible?
The varint (arbitrary-precision integer) type should be compatible. I should be able to get Int32Type support added shortly, so you may just want to wait for that.
great, thank you!
If i understand correctly varinit can't have a negative number is that correct?
I can. It's modeled after Java's BigInteger.
Alright, Int32Type support is in, so take your pick. If you're dealing with small numbers, varint will save you a few bytes.
When i query the database after upgrading to cassandra 1.1 all my columns that have integers are returned with no data. I verified the data is there with CQL and opscenter.
For example if print_r the results a column will show:
[level_access] =>
when it shoud be:
[level_access] => 2