瀏覽代碼

Document unset value (#1060)

* document UnsetValue

* mention that UnsetValue only works with protocol v4
Vincent Rischmann 7 年之前
父節點
當前提交
c79450b345
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      frame.go

+ 7 - 0
frame.go

@@ -18,6 +18,13 @@ import (
 
 type unsetColumn struct{}
 
+// UnsetValue represents a value used in a query binding that will be ignored by Cassandra.
+//
+// By setting a field to the unset value Cassandra will ignore the write completely.
+// The main advantage is the ability to keep the same prepared statement even when you don't
+// want to update some fields, where before you needed to make another prepared statement.
+//
+// UnsetValue is only available when using the version 4 of the protocol.
 var UnsetValue = unsetColumn{}
 
 type namedValue struct {