我想针对 Cassandra 支持的数据访问层编写测试。因此,我将 Embedded Cassandra 与 Astyanax 和 cassandra-unit 一起使用,但我找不到将包含此类内容的脚本加载到嵌入式实例中的方法:
create column family user_profiles
with key_validation_class = UTF8Type
and comparator = UTF8Type
and column_metadata = [
{column_name: first_name, validation_class: UTF8Type},
{column_name: last_name, validation_class: UTF8Type},
{column_name: email, validation_class: UTF8Type},
{column_name: year_of_birth, validation_class: IntegerType}
]
有没有办法做到这一点?如果我在脚本中切换到 CQL3,该解决方案会起作用吗?