Cassandra Frozen关键字含义 [英] Cassandra frozen keyword meaning
问题描述
Cassandra中frozen
关键字的含义是什么?
What's the meaning of the frozen
keyword in Cassandra?
我正在尝试阅读此文档页面:使用用户定义的类型,但是对frozen
关键字的解释(在示例中使用)对我来说还不够清楚:
I'm trying to read this documentation page: Using a user-defined type, but their explanation for the frozen
keyword (which they use in their examples) is not clear enough for me:
为支持将来的功能,用户定义的列定义 或元组类型需要Frozen关键字.卡桑德拉序列化一个 具有多个组成部分的固定值.为了 示例和用法信息,请参阅使用用户定义的类型", 元组类型"和集合类型.
To support future capabilities, a column definition of a user-defined or tuple type requires the frozen keyword. Cassandra serializes a frozen value having multiple components into a single value. For examples and usage information, see "Using a user-defined type", "Tuple type", and Collection type.
我在网上没有找到其他定义或明确的解释.
I haven't found any other definition or a clear explanation for that in the net.
推荐答案
在Cassandra中,如果将UDT或Collection定义为冻结,则无法更新UDT或collection的单个项目,必须重新插入完整值.
冻结值将多个组件序列化为一个值.非冻结类型允许更新各个字段. Cassandra将冻结类型的值视为blob.整个值都必须被覆盖.
A frozen value serializes multiple components into a single value. Non-frozen types allow updates to individual fields. Cassandra treats the value of a frozen type as a blob. The entire value must be overwritten.
来源: https://docs.datastax.com/zh/cql/3.1/cql/cql_reference/collection_type_r.html
@Alon:长话短说:冻结=不变"
这篇关于Cassandra Frozen关键字含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!