Pārlūkot izejas kodu

Document unset value (#1060)

* document UnsetValue

* mention that UnsetValue only works with protocol v4
Vincent Rischmann 7 gadi atpakaļ
vecāks
revīzija
c79450b345
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  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 {