Dưới đây là một ví dụ CQL từ một Cassandra 1.1 schema liên quan bài đăng blog trên trang web Datastax http://www.datastax.com/dev/blog/schema-in-cassandra-1-1
CREATE TABLE users (
id uuid PRIMARY KEY,
name varchar,
state varchar
);
tôi đã sử dụng chỉ 0.7.x nơi bạn có thể chỉ định kiểu dữ liệu của khóa. Sau đây là từ 0,7,6 cassandra-cli "giúp giả định;" lệnh
assume <column_family> keys as <type>;
Assume one of the attributes (comparator, sub_comparator, validator or keys)
of the given column family to match specified type. Available types: bytes, integer, long, lexicaluuid, timeuuid, utf8, ascii.
Nguồn
2012-04-14 11:29:41