我正在使用 Cassandra.Data.Linq
命名空间中的 Batch 类。不是 BatchStatement
。 Batch 类有一个字段用于 batchType
(Counter、Logged、Unlogged)。但是,我没有看到将其设置为 Unlogged
的方法。希望我只是忽略了它。
最佳答案
目前 (2.5.2),无法将 batchType
设置为 Unlogged
。
_batchType
是一个 protected 字段,仅有的两个扩展抽象 Batch
类的类不会公开任何允许您设置该字段的方法或属性。
https://github.com/datastax/csharp-driver/blob/master/src/Cassandra/Data/Linq/BatchV1.cs
https://github.com/datastax/csharp-driver/blob/master/src/Cassandra/Data/Linq/BatchV2.cs
关于c# - 使用 Datastax Cassandra CSharp LINQ Batch 时,有没有办法创建未记录的批处理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24071824/