问题
i want to use php for my project with phpcassa which doesn't support cql, so if I understood right I have to code cassandra commands like I would with cassandra-cli.
My question is how can I create a Composite-keyed Table or Dynamic Column Families like in this website, though not with cql but with cassandra-cli and where can I find more information about this language.
回答1:
create column family myColumnFamily
with key_validation_class = 'CompositeType(UUIDType,UTF8Type)'
and comparator = 'CompositeType(LongType,UTF8Type)'
and default_validation_class = UTF8Type
The above command creates
- A column family named myColumnFamily
- With composite row key of type UUID:String
- With composite column name of type Long:String
- With value of type String
来源:https://stackoverflow.com/questions/18800983/create-composite-keyed-table-with-cassandra-cli